fix(deps): pin pytest-django to 4.11.1 to unblock CI - #725
Merged
Conversation
pytest-django~=4.11 resolved to 4.12.0, which raises AttributeError on PytestDjangoTestCase._pre_setup_ran_eagerly during test setup, an internal fixture-machinery attribute this project does not control. This broke setup of every test in cardpicker/tests/test_artbox_exemplar_backfill.py and was failing Backend tests on every open PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
pytest-django~=4.11inMPCAutofill/requirements.txtresolved to4.12.0,which raises
AttributeError: type object 'PytestDjangoTestCase' has no attribute '_pre_setup_ran_eagerly'inside its own fixture machinery. Thisfires at setup of every test in
cardpicker/tests/test_artbox_exemplar_backfill.py, failingBackend testson every open PR (confirmed on #703 and #717, identical signature) and on
master's next run. No project code causes or can fix this — the attribute
belongs to pytest-django's own internals, which changed between 4.11.x and
4.12.0.
This PR pins to
pytest-django==4.11.1(the newest 4.11.x release, verifiedworking) with an inline comment explaining what the pin protects against, so
the resolution is deliberate rather than whatever upstream published most
recently.
Other unpinned/loosely-pinned specifiers with the same hazard
Not touched here, scoped out to keep this diff reviewable, listed for a
follow-up:
django-allauth[socialaccount]~=65.4— two-component~=, admits any65.xfactory-boy~=3.2— two-component~=, admits any3.xfreezegun~=1.2— two-component~=, admits any1.xpytest~=9.0— two-component~=, admits any9.xsyrupy~=5.1— two-component~=, admits any5.xpre-commit— fully unpinnedtestcontainers[postgres,elasticsearch]— fully unpinnedtzdata— fully unpinnedChecklist
pre-commitand installed the hooks withpre-commit installbefore creating any commits./tmp, installedMPCAutofill/requirements.txtwith the new pin, confirmedpytest-django-4.11.1resolved (not 4.12.0).cardpicker/tests/test_artbox_exemplar_backfill.py(the file that errors at setup under 4.12.0) in that venv: 33 passed.cardpicker/suite in the same venv: 3655 passed, 11 skipped, 0 failed — no regressions from the downgrade.Task-end checks