#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 Changed 17 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 17 months ago by Andrew Godwin <andrew@…>

  • Owner set to Andrew Godwin <andrew@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 98dd8dd02e6a005266866ab1cb4a2ec00dce0193:

Fixed #21892: RunPython no longer accepts strings

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