[Django] #21037: MigrationWriter.serialize() output invalid python for lambda functions.

5 views
Skip to first unread message

Django

unread,
Sep 4, 2013, 11:32:47 PM9/4/13
to django-...@googlegroups.com
#21037: MigrationWriter.serialize() output invalid python for lambda functions.
----------------------------+--------------------
Reporter: loic84 | Owner:
Type: Bug | Status: new
Component: Migrations | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
{{{
AssertionError: Could not exec u'import
migrations.test_writer\ntest_value_result =
migrations.test_writer.<lambda>' (from value <function <lambda> at
0x104c7bde8>): invalid syntax (<string>, line 2)
}}}

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

Django

unread,
Sep 4, 2013, 11:44:52 PM9/4/13
to django-...@googlegroups.com
#21037: MigrationWriter.serialize() output invalid python for lambda functions.
----------------------------+--------------------------------------

Reporter: loic84 | Owner:
Type: Bug | Status: new
Component: Migrations | Version: master
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 loic84):

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_docs: => 0


Comment:

PR https://github.com/django/django/pull/1550

We have two options here, either we error out or we nullify them: `lambda
*args, **kwargs: None`.

I chose the former.

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

Django

unread,
Sep 6, 2013, 8:55:47 AM9/6/13
to django-...@googlegroups.com
#21037: MigrationWriter.serialize() output invalid python for lambda functions.
----------------------------+------------------------------------

Reporter: loic84 | Owner:
Type: Bug | Status: new
Component: Migrations | Version: master
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 timo):

* stage: Unreviewed => Accepted


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

Django

unread,
Sep 6, 2013, 8:13:14 PM9/6/13
to django-...@googlegroups.com
#21037: MigrationWriter.serialize() output invalid python for lambda functions.
-------------------------------------+-------------------------------------
Reporter: loic84 | Owner: Tim
Type: Bug | Graham <timograham@…>
Component: Migrations | Status: closed
Severity: Normal | Version: master
Keywords: | Resolution: fixed
Has patch: 1 | Triage Stage: Accepted
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* owner: => Tim Graham <timograham@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"adc0ab3386520874dbc96c2f905fd66769b8f16d"]:
{{{
#!CommitTicketReference repository=""
revision="adc0ab3386520874dbc96c2f905fd66769b8f16d"
Fixed #21037 -- Made MigrationWriter raise a ValueError when serializing
lambda functions.
}}}

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

Reply all
Reply to author
Forward
0 new messages