From 92b20715c270ccee83aa360c2ab52eda2d78853c Mon Sep 17 00:00:00 2001 From: nstarman Date: Mon, 7 Sep 2026 14:32:17 -0400 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix:=20drop=20class=20scope?= =?UTF-8?q?=20from=20the=20`d`=20fixture=20for=20pytest=209?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pytest 9 deprecates class-scoped fixtures defined as instance methods (PytestRemovedIn10Warning). With `filterwarnings = ["error"]` the warning is raised during fixture setup, which errors the first test and leaves the FixtureDef half-initialised, so the remaining 11 tests fail on pytest's internal `assert not self._finalizers`. `d` just builds `ImmutableMap(a=1, b=2)`, so class scope buys nothing. Co-Authored-By: Claude Opus 5 --- tests/test_immutablemap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_immutablemap.py b/tests/test_immutablemap.py index f867b8d..95ebc10 100644 --- a/tests/test_immutablemap.py +++ b/tests/test_immutablemap.py @@ -12,7 +12,7 @@ class TestImmutableMap: """Test :class:`ImmutableMap`.""" - @pytest.fixture(scope="class") + @pytest.fixture def d(self) -> ImmutableMap[str, Any]: """Example immutable map.""" return ImmutableMap(a=1, b=2) From 5b6d8c3ebd9031a6b7be15100c405375d1cb451a Mon Sep 17 00:00:00 2001 From: nstarman Date: Mon, 7 Sep 2026 14:32:19 -0400 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=B7=20ci:=20add=20a=20canary=20job?= =?UTF-8?q?=20resolving=20the=20newest=20dependencies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI runs against uv.lock, so a breaking release (such as pytest 9) is only noticed when the lock is refreshed. This job re-resolves to the newest versions on every run. It is deliberately excluded from the `status` gate so an upstream release cannot block merges. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 290e88a..fa98372 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,6 +71,26 @@ jobs: name: coverage-report-python path: coverage.xml + # Canary: resolve the newest releases instead of the lockfile, so a breaking + # change (e.g. a new pytest major) surfaces here before it lands in uv.lock. + # Deliberately not in `status`, so an upstream release cannot block merges. + tests-latest: + name: Check newest dependencies + runs-on: ubuntu-latest + needs: [format] + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Install uv + uses: astral-sh/setup-uv@702b425af1c366e68b4a9449a8de6dd98b63e979 # v7.1.2 + with: + python-version: "3.13" + + - name: Test package + run: + uv run --no-default-groups --group test --upgrade pytest + --durations=20 + upload-coverage-python: needs: tests if: >-