Opened 4 years ago

Last modified 4 years ago

#29125 closed Bug

BUG: Q object deconstruct is inconsistent when passing multiple kwargs. — at Version 1

Reported by: Harro Owned by: nobody
Component: Database layer (models, ORM) Version: 2.0
Severity: Release blocker Keywords:
Cc: hvdklauw@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Harro)

Here is a branch with a randomly failing test that proves this: https://github.com/hvdklauw/django/blob/bug/q_destruct/tests/queries/test_q.py#L63

The biggest issue is that now makemigrations is detecting changes since we upgraded to django 2.0 (only with python 3.5) that aren't changes at all, just reordered kwargs on the Q objects in out limit_choices_to on some foreignkeys.

This also means we randomly can't commit/release because we have pre-commit hooks and CI that runs makemigrations --check --dryrun

Upgrading to python 3.6 would fix it (because of ordered kwargs) but as Ubuntu 16.04 is still the latest LTS, python 3.5 is what we are stuck with.

This is the commit that broke it: https://github.com/django/django/commit/508b5debfb16843a8443ebac82c1fb91f15da687

Change History (1)

comment:1 Changed 4 years ago by Harro

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top