Opened 11 years ago

Closed 11 years ago

#21892 closed Cleanup/optimization (fixed)

Remove "string based" RunPython operations.

Reported by: loic84 Owned by: Andrew Godwin <andrew@…>
Component: Migrations Version: 1.7-alpha-1
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Example of "string based" RunPython operation:

# Create the operation
operation = migrations.RunPython(
    """
    Pony = models.get_model("test_runpython", "Pony")
    Pony.objects.create(pink=2, weight=4.55)
    Pony.objects.create(weight=1)
    """,
)

This removal was discussed on IRC with Andrew, the rationale being that most Python tooling wouldn't be able to inspect this code and that it doesn't provide an obvious gain compared to callables.

Marking it as release blocker, since we should remove this feature before people start using it.

Change History (2)

comment:1 by Tim Graham, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Andrew Godwin <andrew@…>, 11 years ago

Owner: set to Andrew Godwin <andrew@…>
Resolution: fixed
Status: newclosed

In 98dd8dd02e6a005266866ab1cb4a2ec00dce0193:

Fixed #21892: RunPython no longer accepts strings

Note: See TracTickets for help on using tickets.
Back to Top