Skip to content

chore(deps): bump pytest to 9.0.3 and fold pytest-matrix latest#413

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
fix/dependabot-78-pytest-9.0.3
May 11, 2026
Merged

chore(deps): bump pytest to 9.0.3 and fold pytest-matrix latest#413
Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
fix/dependabot-78-pytest-9.0.3

Conversation

@starfolkai
Copy link
Copy Markdown
Contributor

@starfolkai starfolkai Bot commented May 11, 2026

Summary

  • Fixes Dependabot alert #78 (pytest tmpdir handling) by bumping the base test dependency group from pytest==9.0.2pytest==9.0.3.
  • Removes the duplicated latest = "pytest==9.0.3" from [tool.braintrust.matrix.pytest-matrix] and derives test_pytest_plugin(latest) from [dependency-groups].test via a new _BASE_GROUP_FALLBACKS set in py/noxfile.py. The pin can't drift again because the matrix table doesn't participate in uv lock, but the dependency group does.
  • test_pytest_plugin(latest) and test_pytest_plugin(8.4.2) both still enumerate; only the duplicate version string is gone.

Why was this drift possible?

The two pins were introduced divergent in #300. The weekly uv lock --upgrade workflow only refreshes [dependency-groups]; matrix-table strings are managed separately, so they drift.

Test plan

  • nox -l | grep test_pytest_plugin shows both (latest) and (8.4.2).
  • uv lock --check clean; uv.lock resolves pytest to 9.0.3.
  • scripts/check-stale-cassettes.py still passes.
  • CI: full sharded nox matrix + static_checks.
  • nox -s "test_pytest_plugin(latest)" locally.
  • nox -s "test_pytest_plugin(8.4.2)" locally.

🤖 Generated with Claude Code

Fixes Dependabot alert #78 (GHSA pytest tmpdir handling). The base
`test` dependency group pinned `pytest==9.0.2` while
`[tool.braintrust.matrix.pytest-matrix].latest` already pinned `9.0.3`;
the two were born divergent in #300 and could drift again because the
matrix table doesn't participate in `uv lock`.

Make `[dependency-groups].test` the single source of truth for the
pytest pin and have the noxfile derive `test_pytest_plugin(latest)` from
it via a small `_BASE_GROUP_FALLBACKS` set. `test_pytest_plugin(latest)`
still runs; the matrix table only carries deliberate older overrides
(`8.4.2`).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@starfolkai starfolkai Bot force-pushed the fix/dependabot-78-pytest-9.0.3 branch from fb9f5af to 55bda9a Compare May 11, 2026 18:01
Follow-up on the prior commit. Restore `latest = "pytest==9.0.3"` in
[tool.braintrust.matrix.pytest-matrix] as the single source of truth and
keep [dependency-groups].test in sync mechanically:

- Add py/scripts/sync-pytest-pin.py — reads matrix latest, rewrites the
  dep-group pin (or fails with --check) so the lockfile-anchored pin
  matches what test_pytest_plugin(latest) installs.
- Wire it into pre-commit as a --check gate on py/pyproject.toml.
- Add `make sync-pytest-pin` mirroring make check-stale-cassettes.
- Revert the noxfile _BASE_GROUP_FALLBACKS introduced earlier; the
  matrix table now has a `latest` entry, so the existing
  _install_matrix_dep path works without special-casing.

TOML/PEP 735 have no variable substitution and uv resolves dep-groups
statically, so a tiny rewrite step is the simplest way to keep one
visible canonical pin while preserving uv.lock reproducibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@starfolkai starfolkai Bot force-pushed the fix/dependabot-78-pytest-9.0.3 branch from 9510098 to a4c0ee2 Compare May 11, 2026 19:02
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) enabled auto-merge (squash) May 11, 2026 19:08
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 2f2b2f8 into main May 11, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the fix/dependabot-78-pytest-9.0.3 branch May 11, 2026 19:11
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.

2 participants