Opened 9 years ago

Closed 9 years ago

Last modified 9 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:1 Changed 9 years ago by Loic Bistuer

Has patch: set

comment:2 Changed 9 years ago by Tim Graham

Triage Stage: UnreviewedReady for checkin
Version: master1.7

comment:3 Changed 9 years ago by Loic Bistuer <loic.bistuer@…>

Resolution: fixed
Status: newclosed

In b23d47412c12352ba2e2133b05a15ccd09e81af3:

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

Thanks Tim Graham for the review.

comment:4 Changed 9 years ago by Loic Bistuer <loic.bistuer@…>

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