Skip to content

fix(deps): pin pytest-django to 4.11.1 to unblock CI - #725

Merged
WilfordGrimley merged 1 commit into
masterfrom
pin-pytest-django
Aug 6, 2026
Merged

fix(deps): pin pytest-django to 4.11.1 to unblock CI#725
WilfordGrimley merged 1 commit into
masterfrom
pin-pytest-django

Conversation

@WilfordGrimley

Copy link
Copy Markdown

Description

pytest-django~=4.11 in MPCAutofill/requirements.txt resolved to 4.12.0,
which raises AttributeError: type object 'PytestDjangoTestCase' has no attribute '_pre_setup_ran_eagerly' inside its own fixture machinery. This
fires at setup of every test in
cardpicker/tests/test_artbox_exemplar_backfill.py, failing Backend tests
on 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, verified
working) 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 any 65.x
  • factory-boy~=3.2 — two-component ~=, admits any 3.x
  • freezegun~=1.2 — two-component ~=, admits any 1.x
  • pytest~=9.0 — two-component ~=, admits any 9.x
  • syrupy~=5.1 — two-component ~=, admits any 5.x
  • pre-commit — fully unpinned
  • testcontainers[postgres,elasticsearch] — fully unpinned
  • tzdata — fully unpinned

Checklist

  • I have installed pre-commit and installed the hooks with pre-commit install before creating any commits.
  • I have updated any related tests for code I modified or added new tests where appropriate. (N/A — dependency pin only, no test/behavior change)
  • I have manually tested my changes as follows:
    • Built a throwaway virtualenv under /tmp, installed MPCAutofill/requirements.txt with the new pin, confirmed pytest-django-4.11.1 resolved (not 4.12.0).
    • Ran cardpicker/tests/test_artbox_exemplar_backfill.py (the file that errors at setup under 4.12.0) in that venv: 33 passed.
    • Ran the full cardpicker/ suite in the same venv: 3655 passed, 11 skipped, 0 failed — no regressions from the downgrade.
  • I have updated any relevant documentation or created new documentation where appropriate. (N/A — no user- or admin-facing behavior change)

Task-end checks

  • Wiki: N/A — no user- or admin-facing change.
  • Extractable-primitives ledger: N/A — no primitive extracted/removed.
  • Constant-rename equivalence: N/A — no constant renamed/moved.

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.
@WilfordGrimley
WilfordGrimley merged commit 9078f1c into master Aug 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant