From 56226324a9baebde8fcbd382cc7639c18d741c54 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 5 Nov 2026 11:27:07 -0500 Subject: [PATCH 1/2] ci: fix test startup with pytest 9.2 without ignoring its warnings With filterwarnings = error, pytest 9.2 stops at startup in two jobs: - anyio < 4.15's pytest plugin imports the deprecated _pytest.python.CallSpec2. The ROOT jobs get anyio from conda-forge as a dependency of ROOT, so ask for anyio>=4.15 there. - pytest-asyncio, installed with pytest-pyodide, warns that asyncio_default_fixture_loop_scope is unset. Set it on the command line of the Pyodide job; it can't go in pyproject.toml because --strict-config rejects it in the jobs that don't have pytest-asyncio. Assisted-by: Claude Code:claude-opus-5-5 --- .github/workflows/build-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1f6392589..089bde9ac 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -68,6 +68,7 @@ jobs: conda-forge/label/python_rc::_python_rc python=${{ matrix.python-version }} ${{ matrix.root-version == 'latest' && 'root' || matrix.root-version == '6.32' && 'root=6.32.*' || '' }} + ${{ matrix.root-version && 'anyio>=4.15' || '' }} ${{ matrix.coverage && 'xrootd' || '' }} micromamba-version: 2.6.0-0 # unpin when there is a release newer than 2.6.1-0 @@ -225,11 +226,11 @@ jobs: - name: Run pytest (Chrome) run: | - pytest -vv --dist-dir=./pyodide-dist/ --runner=selenium --runtime=chrome tests-wasm + pytest -vv -o asyncio_default_fixture_loop_scope=function --dist-dir=./pyodide-dist/ --runner=selenium --runtime=chrome tests-wasm - name: Run pytest (Firefox) run: | - pytest -vv --dist-dir=./pyodide-dist/ --runner=selenium --runtime=firefox tests-wasm + pytest -vv -o asyncio_default_fixture_loop_scope=function --dist-dir=./pyodide-dist/ --runner=selenium --runtime=firefox tests-wasm gpu-build: name: GPU test with CUDA ${{ matrix.cuda-version }} From 66167b300d43c6e334542a1c8511438dc471c902 Mon Sep 17 00:00:00 2001 From: Andres Rios Tascon Date: Thu, 5 Nov 2026 12:16:58 -0500 Subject: [PATCH 2/2] ci: disable anyio's pytest plugin instead of requiring anyio>=4.15 conda-forge's anyio 4.15+ requires Python >= 3.11, so the ROOT 6.32 job, on Python 3.10, couldn't be solved. No test uses anyio's pytest plugin, so don't load it, which works with any anyio version, or none. Assisted-by: Claude Code:claude-opus-5-5 --- .github/workflows/build-test.yml | 1 - pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 089bde9ac..3f17f039c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -68,7 +68,6 @@ jobs: conda-forge/label/python_rc::_python_rc python=${{ matrix.python-version }} ${{ matrix.root-version == 'latest' && 'root' || matrix.root-version == '6.32' && 'root=6.32.*' || '' }} - ${{ matrix.root-version && 'anyio>=4.15' || '' }} ${{ matrix.coverage && 'xrootd' || '' }} micromamba-version: 2.6.0-0 # unpin when there is a release newer than 2.6.1-0 diff --git a/pyproject.toml b/pyproject.toml index 41bc52f19..75f928ab3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,7 @@ version-file = "src/uproot/version.py" source = "vcs" [tool.pytest.ini_options] -addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"] +addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config", "-p", "no:anyio"] # no test uses anyio's plugin, which breaks pytest >= 9.2 with anyio < 4.15 filterwarnings = [ "error", "default:module 'sre_.*' is deprecated:DeprecationWarning",