Opened 5 years ago

Closed 5 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


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 Changed 5 years ago by Piper Merriam

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

comment:2 Changed 5 years ago by Carl Meyer

Triage Stage: UnreviewedAccepted

Seems reasonable to me.

comment:3 Changed 5 years ago by Carl Meyer

Triage Stage: AcceptedReady for checkin

comment:4 Changed 5 years ago by Tim Graham <timograham@…>

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