[Django] #24521: frozensets don't seem to work quite right in migrations as field kwargs

9 views
Skip to first unread message

Django

unread,
Mar 22, 2015, 9:31:32 AM3/22/15
to django-...@googlegroups.com
#24521: frozensets don't seem to work quite right in migrations as field kwargs
----------------------------+---------------------------------------
Reporter: ris | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords: migration kwarg frozenset
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+---------------------------------------
Apologies if this is a rather sparse bug report, but I think it's quite a
straightforward issue to explain.

Using django 1.7.7, a custom model field returning a {{{frozenset}}} as a
value in the {{{kwargs}}} dict from {{{deconstruct}}} will cause
{{{makemigrations}}} to seemingly coerce this value to a tuple. Because
this tuple does not exactly equal the frozenset, this trips up
{{{makemigrations}}}' change detection logic, and this will get detected
as a "change" each and every time {{{makemigrations}}} is run for
eternity.

Use of a {{{set}}} however works as expected, so this is a bit odd.

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

Django

unread,
Mar 23, 2015, 10:40:12 AM3/23/15
to django-...@googlegroups.com
#24521: frozensets don't seem to work quite right in migrations as field kwargs
-------------------------------------+-------------------------------------

Reporter: ris | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: migration kwarg | Triage Stage: Accepted
frozenset |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* has_patch: 0 => 1
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

PR here: https://github.com/django/django/pull/4387

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

Django

unread,
Mar 23, 2015, 11:01:29 AM3/23/15
to django-...@googlegroups.com
#24521: frozensets don't seem to work quite right in migrations as field kwargs
-------------------------------------+-------------------------------------

Reporter: ris | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: migration kwarg | Triage Stage: Ready for
frozenset | checkin

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

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

* stage: Accepted => Ready for checkin


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

Django

unread,
Mar 23, 2015, 11:04:00 AM3/23/15
to django-...@googlegroups.com
#24521: frozensets don't seem to work quite right in migrations as field kwargs
-------------------------------------+-------------------------------------
Reporter: ris | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.7
Severity: Normal | Resolution: fixed

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

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Baptiste Mispelon <bmispelon@…>):

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


Comment:

In [changeset:"1aadade373336c3f534986cdcc0ba33714d85c8e" 1aadade]:
{{{
#!CommitTicketReference repository=""
revision="1aadade373336c3f534986cdcc0ba33714d85c8e"
Fixed #24521 -- Added support for serializing frozensets in migrations.
}}}

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

Reply all
Reply to author
Forward
0 new messages