From 7e32316cfd88e06202ed9877ef2d71ce1492bcb6 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 17 Jun 2026 14:15:24 +0200 Subject: [PATCH] Pin pytest to <9 in the integration tests package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #1301 pinned pytest to <9 in the root pyproject.toml / uv.lock, but the ess-community-integration-tests package in tests/pyproject.toml still declared an unbounded `pytest>=8.4.2`. Downstream consumers (e.g. matrix-authentication-service, synapse) install the suite via `uv tool install git+...#subdirectory=tests`, which resolves fresh from tests/pyproject.toml and ignores the workspace uv.lock — so they pull pytest 9, which breaks pytest-asyncio-cooperative (sync tests depending on async fixtures became a hard error, and the cluster fixture trips the "more than one yield" check). Apply the same <9 bound to the test package itself. --- newsfragments/+pin-pytest8-tests-package.internal.md | 1 + tests/pyproject.toml | 2 +- uv.lock | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 newsfragments/+pin-pytest8-tests-package.internal.md diff --git a/newsfragments/+pin-pytest8-tests-package.internal.md b/newsfragments/+pin-pytest8-tests-package.internal.md new file mode 100644 index 00000000..64573a4d --- /dev/null +++ b/newsfragments/+pin-pytest8-tests-package.internal.md @@ -0,0 +1 @@ +Pin pytest to `<9` in the `ess-community-integration-tests` package as well, so downstream consumers that `uv tool install` the test package (rather than running from the locked workspace) don't pull pytest 9, which breaks `pytest-asyncio-cooperative`. Completes the pin from #1301. diff --git a/tests/pyproject.toml b/tests/pyproject.toml index 64f8e24d..9d6646e4 100644 --- a/tests/pyproject.toml +++ b/tests/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "pyhelm3 @ git+https://github.com/element-hq/pyhelm3.git@efa509e7501edeb9d04f2a9e688f6e0088305954", "pytest-asyncio-cooperative>=0.40.0", "pytest-kubernetes>=0.7.2", - "pytest>=8.4.2", + "pytest>=8.4.2,<9", # pytest 9 breaks pytest-asyncio-cooperative (see #1301) "python-dotenv>=1.2.2", "python-on-whales>=0.80.0", "pyyaml>=6.0.3", diff --git a/uv.lock b/uv.lock index 390a2616..3390ff12 100644 --- a/uv.lock +++ b/uv.lock @@ -929,7 +929,7 @@ requires-dist = [ { name = "platformdirs", specifier = ">=4.9.2" }, { name = "prometheus-client", specifier = ">=0.24.1" }, { name = "pyhelm3", git = "https://github.com/element-hq/pyhelm3.git?rev=efa509e7501edeb9d04f2a9e688f6e0088305954" }, - { name = "pytest", specifier = ">=8.4.2" }, + { name = "pytest", specifier = ">=8.4.2,<9" }, { name = "pytest-asyncio-cooperative", specifier = ">=0.40.0" }, { name = "pytest-kubernetes", specifier = ">=0.7.2" }, { name = "python-dotenv", specifier = ">=1.2.2" },