Opened 9 years ago

Closed 9 years ago

#25186 closed Cleanup/optimization (fixed)

Improve migration serialization of builtins

Reported by: Piper Merriam Owned by: Piper Merriam
Component: Migrations Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the current state, when MigrationWriter.serialize receives something from __builtin__, the resulting string and imports contain __builtin__. This means that the migration file will contain an import __builtin__ and the actual function will be called via __builtin__.range.

It seems that the result call the function directly (without the __builtin__ prefix and that the import of __builtin__ should not be included.

Change History (4)

comment:1 by Piper Merriam, 9 years ago

Has patch: set
Owner: changed from nobody to Piper Merriam
Status: newassigned

comment:2 by Carl Meyer, 9 years ago

Triage Stage: UnreviewedAccepted

Seems reasonable to me.

comment:3 by Carl Meyer, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In b1e552d:

Fixed #25186 -- Improved migration's serialization of builtins on Python 2.

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