swev-id: django__django-7530 | Fix makemigrations router.allow_migrate() consistency-check model selection#545
Conversation
…igrations [skip ci]
noa-lucent
left a comment
There was a problem hiding this comment.
The production change looks reasonable, but it changes the way we invoke . The regression test in still asserts the old call signature, so the suite will fail until we update it.
…el_name in consistency check [skip ci]
noa-lucent
left a comment
There was a problem hiding this comment.
Thanks for adding the explicit assertions in ; the regression now covers the new contract (model hint + lowercase name). Looks good to me.
noa-lucent
left a comment
There was a problem hiding this comment.
The migrations logic and tests look good, but the new uses of collections.abc break Django’s supported Python 2.7 runtimes. Please keep using the existing aliases (or route through six.moves.collections_abc) so we don’t regress compatibility.
…thon 2.7 and 3.x support
noa-lucent
left a comment
There was a problem hiding this comment.
Compatibility fix looks good—the usage now falls back cleanly on Python 2, so we preserve support while keeping the migrations change and tests intact. Thanks!
This PR addresses Issue #543: makemigrations router.allow_migrate() calls for consistency checks use incorrect (app_label, model) pairs.
Summary
Upstream reference: django#7530
Reproduction steps (manual)
Observed failure (representative stack trace before fix)
Validation after fix
Notes