[Django] #25186: Improve migration serialization of builtins

6 views
Skip to first unread message

Django

unread,
Jul 28, 2015, 4:16:53 PM7/28/15
to django-...@googlegroups.com
#25186: Improve migration serialization of builtins
--------------------------------------+--------------------
Reporter: pipermerriam | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/25186>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 28, 2015, 4:17:41 PM7/28/15
to django-...@googlegroups.com
#25186: Improve migration serialization of builtins
-------------------------------------+-------------------------------------
Reporter: pipermerriam | Owner:
Type: | pipermerriam
Cleanup/optimization | Status: assigned
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by pipermerriam):

* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => pipermerriam
* needs_docs: => 0
* has_patch: 0 => 1


Comment:

Pull request here https://github.com/django/django/pull/5063

--
Ticket URL: <https://code.djangoproject.com/ticket/25186#comment:1>

Django

unread,
Jul 28, 2015, 4:21:58 PM7/28/15
to django-...@googlegroups.com
#25186: Improve migration serialization of builtins
-------------------------------------+-------------------------------------
Reporter: pipermerriam | Owner:
Type: | pipermerriam
Cleanup/optimization | Status: assigned
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by carljm):

* stage: Unreviewed => Accepted


Comment:

Seems reasonable to me.

--
Ticket URL: <https://code.djangoproject.com/ticket/25186#comment:2>

Django

unread,
Jul 28, 2015, 4:23:51 PM7/28/15
to django-...@googlegroups.com
#25186: Improve migration serialization of builtins
-------------------------------------+-------------------------------------
Reporter: pipermerriam | Owner:
Type: | pipermerriam
Cleanup/optimization | Status: assigned
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by carljm):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25186#comment:3>

Django

unread,
Jul 28, 2015, 6:17:03 PM7/28/15
to django-...@googlegroups.com
#25186: Improve migration serialization of builtins
-------------------------------------+-------------------------------------
Reporter: pipermerriam | Owner:
Type: | pipermerriam
Cleanup/optimization | Status: closed
Component: Migrations | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"b1e552debf8303124a213008d319df9a817b4932" b1e552d]:
{{{
#!CommitTicketReference repository=""
revision="b1e552debf8303124a213008d319df9a817b4932"
Fixed #25186 -- Improved migration's serialization of builtins on Python
2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25186#comment:4>

Reply all
Reply to author
Forward
0 new messages