Skip to content

Take pytest 9.1.2 when it ships: #73's exclusion of 9.1.0/9.1.1 #83

Closed

Description

@gregoryfoster

Follow-up to #73 (5aa791d). Waiting on pytest 9.1.2.

#73's cause was upstream, in pytest-dev/pytest#14635. pytest 9.1.0 and 9.1.1 bind a directory's conftest fixtures to the first Directory node collected for it. A command line that interleaves a sibling module builds a second node, and that node matches nothing. The fix (pytest-dev/pytest#14645) is backported to 9.1.x but not released: on 2026-10-06 PyPI's newest is 9.1.1. So pyproject.toml now pins pytest>=9.0.3,!=9.1.0,!=9.1.1,<10, and the lock holds 9.0.3.

When 9.1.2 is on PyPI

uv lock --upgrade-package pytest   # no pyproject edit: the spec already admits it
uv sync --group dev
uv run pytest tests/deploy/test_pytest_collection.py   # six orders; red means 9.1.2 lacks the fix
uv run pytest

9.1.2.dev28+g45a2a8d0e (9.1.x's head on 2026-10-06) already passes all six. Once the lock is on 9.1.2, the != exclusions and their comment in pyproject.toml can be dropped or kept; either is fine.

Done when

The lock is on a pytest that carries the fix, test_pytest_collection.py is green on it, and CI is green.

Activity

  1. gregoryfoster commented on Oct 28, 2026

    @gregoryfoster
    MemberAuthor

    Hand-off brief: #83 (coordinator, #80, 2026-10-28)

    Unblocked by pytest 9.2.0, not 9.1.2. 9.2.0 went up on PyPI 2026-10-27T21:30Z. 9.1.2 never shipped: PyPI goes from 9.1.1 (2026-06-19) straight to 9.2.0. The 9.2.0 release notes list pytest-dev/pytest#14635: "Fixed fixture resolution failures when specifying multiple test paths on the command line that share common parent directories". That's #73's cause. pyproject.toml's spec pytest>=9.0.3,!=9.1.0,!=9.1.1,<10 already admits it, so the issue's recipe works as written, with 9.2.0 in place of 9.1.2.

    9.2.0 is a minor release: check its breaking changes against this repo

    From the 9.2.0 notes, Removals and backward incompatible breaking changes:

    Recipe

    uv lock --upgrade-package pytest, then uv sync --group dev, then uv run pytest tests/deploy/test_pytest_collection.py (all six orders), then the full suite, then ruff. A red collection test means 9.2.0 lacks the fix after all: say so and stop.

    Decide

    Shipping

    pyproject.toml and uv.lock are runtime paths (drift.py's RUNTIME_FILES), even though pytest is dev-only. Ship with scripts/deploy.sh on origin/main's tip, detached, with the operator's approval, the same as #73 and #124. Before it, read readlink /srv/broker/live and journalctl -t broker-deploy -n 5.

    Verify

    • CI is green by job, audit included, on the final SHA.
    • uv.lock holds pytest 9.2.0.
    • The node's tests/deploy and full-suite counts match the baseline, with the same 4 skips.
    • journalctl -t broker-deploy ends with live is on <sha12>, and drift reads ok.

    Baseline [measured 2026-10-28T05:4xZ]

    Out of scope

    Other dependency bumps, Dependabot's config, and pytest-asyncio unless 9.2.0 forces it (say so if it does).

    Ship

    Close #83 with the lock change, the six orders' result, what each breaking change turned out to touch, the exclusions decision, the commit range, and the deploy evidence. Don't tick #80. Then return to #80's coordinator.

  2. gregoryfoster commented on Oct 28, 2026

    @gregoryfoster
    MemberAuthor

    Done: lock on pytest 9.2.0 (88976b8)

    9.1.2 never shipped; 9.2.0 (PyPI 2026-10-27T21:30Z) is the first release with pytest-dev/pytest#14635's fix, per its notes.

    Lock. uv.lock: pytest 9.0.3 -> 9.2.0, nothing else moved (pluggy already 1.6.0, which 9.2.0 now requires). pytest-asyncio untouched (1.4.0); 9.2.0 forced nothing there.

    Six orders. tests/deploy/test_pytest_collection.py: 6 passed on 9.2.0, including both interleaving orders (test_a-test_top-test_b, test_b-test_top-test_a).

    Breaking changes vs this repo (9.2.0 Removals and backward incompatible breaking changes):

    Exclusions: dropped for a floor. pytest>=9.0.3,!=9.1.0,!=9.1.1,<10 -> pytest>=9.2.0,<10. With 9.1.2 never shipping, a floor says it more plainly. The pyproject.toml comment now names 9.2.0 and pytest-dev/pytest#14635 / #73 instead of 9.1.2. The collection test's docstring dropped "unreleased" and now points at the floor.

    Commits. 6a4cc80..88976b8 (one commit, 88976b8).

    CI on 88976b8, green by job: CI lint + test (40719971136), uv audit (report-only) (40719971454).

    Node counts (~/broker on 88976b8, /etc/broker/.env sourced): tests/deploy 801 passed, 4 skipped; full suite 1348 passed, 4 skipped. Both match the 714db27 baseline, with the same 4 skips.

    Deploy (scripts/deploy.sh 88976b8, detached, operator-approved). Before: live -> releases/714db2740140, journal ended live is on 714db2740140 (2026-10-27T23:05:23Z). After, from journalctl -t broker-deploy:

    2026-10-28T16:15:54Z CI passed for 88976b8a21f5
    2026-10-28T16:15:58Z live -> 88976b8a21f5 (was releases/714db2740140)
    2026-10-28T16:16:00Z the backup run on 88976b8a21f5: unchanged
    2026-10-28T16:20:40Z the probe's tick 43aec5ecbd6d4ba38e12d67e828e09b9 on 88976b8a21f5: exited 0
    2026-10-28T16:20:40Z live is on 88976b8a21f5
    

    Drift at 2026-10-28T16:45:00Z: ok, "live 88976b8 is main" (checkin 202).

    ACL LOG: 5 entries, unchanged. No denial was caused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions