Opened 8 years ago

Closed 8 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 Changed 8 years ago by Baptiste Mispelon

Has patch: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Simon Charette

Triage Stage: AcceptedReady for checkin

comment:3 Changed 8 years ago by Baptiste Mispelon <bmispelon@…>

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