Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23560 closed Bug (fixed)

MigrationWriter prefixes builtin types with __builtins__.

Reported by: Loic Bistuer Owned by: nobody
Component: Migrations Version: 1.7
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

When MigrationWriter finds a builtin type (i.e. not a builtin type instance) it serializes as follows:

import __builtin__
__builtin__.dict

__builtin__ isn't needed nor pretty, but worse it was renamed builtins in PY3 so migrations written in PY2 wouldn't work in PY3 and vice versa.

Change History (4)

comment:2 by Tim Graham, 10 years ago

Triage Stage: UnreviewedReady for checkin
Version: master1.7

comment:3 by Loic Bistuer <loic.bistuer@…>, 10 years ago

Resolution: fixed
Status: newclosed

In b23d47412c12352ba2e2133b05a15ccd09e81af3:

Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.

Thanks Tim Graham for the review.

comment:4 by Loic Bistuer <loic.bistuer@…>, 10 years ago

In 7355885ef504cc34f447311741511018f777667f:

[1.7.x] Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.

Thanks Tim Graham for the review.

Backport of b23d47412c from master

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