#34697: Migration serializer for sets results in indeterministic output due
unstable iteration order / hash randomization
---------------------------------+--------------------------------------
Reporter: Yury V. Zaytsev | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by Simon Charette):
Thanks for your linking the issue Mariusz and for the taking the read
through it and craft a detailed answer Yury.
TL;DR I think your assessment of the current situation makes sense and I'm
starting to believe we should proceed with this patch.
I'm curious of where you experience the flip-flop though. Are you
generating the same migrations over and over again? What development
process causing the ''diffing'' noise you are referring to given
`makemigrations` operates on the equality of objects and should not care
about how they are serialized as long as they are equal.
> Or maybe a better approach would be to switch dependencies to a set if
the order is not important, how would you like that?
I think this is something that should be considered in another ticket but
that we could ultimately do. The fact they are currently stored in a list
today provides a false sense that their ordering is meaningful while it's
not actually the case. That's a problem that is generalized to many parts
of Django unfortunately (e.g. `Model.Meta.unique_together` at the model
definition level in another example) so I'm not sure it's actually worth
the effort in fixing.
--
Ticket URL: <https://code.djangoproject.com/ticket/34697#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018931bae21f-8d77b6b4-226b-4475-9f7b-04cc1d3ed3be-000000%40eu-central-1.amazonses.com.