Opened 9 years ago

Closed 9 years ago

#24521 closed Bug (fixed)

frozensets don't seem to work quite right in migrations as field kwargs

Reported by: ris Owned by: nobody
Component: Migrations Version: 1.7
Severity: Normal Keywords: migration kwarg frozenset
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

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.

Change History (3)

comment:1 by Baptiste Mispelon, 9 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 by Simon Charette, 9 years ago

Triage Stage: AcceptedReady for checkin

comment:3 by Baptiste Mispelon <bmispelon@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 1aadade:

Fixed #24521 -- Added support for serializing frozensets in migrations.

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