Skip to content

ci: fix test startup with pytest 9.2 - #1821

Merged
ariostas merged 2 commits into
scikit-hep:mainfrom
ariostas:test/ignore-pytest-9.2-warnings
Nov 6, 2026
Merged

ariostas merged 2 commits into
scikit-hep:mainfrom
ariostas:test/ignore-pytest-9.2-warnings

Conversation

@ariostas

@ariostas ariostas commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

pytest 9.2.0 makes two CI jobs fail at startup, before any test runs, because of filterwarnings = error. This fixes the causes instead of ignoring the warnings:

  • ROOT 6.32 job: anyio < 4.15's pytest plugin imports the deprecated _pytest.python.CallSpec2 (PytestRemovedIn10Warning). This job gets anyio 4.14.2 from conda-forge as a dependency of ROOT, and conda-forge's anyio 4.15+ requires Python >= 3.11, while the job runs on 3.10. No test uses anyio's pytest plugin, so addopts now has -p no:anyio. That works with any anyio version, or none.
  • Pyodide job: pytest-asyncio (installed with pytest-pyodide) warns that asyncio_default_fixture_loop_scope is unset (PytestDeprecationWarning). The job now sets it to function, the future default, with -o on its pytest command lines. It can't go in pyproject.toml: with --strict-config, every job that doesn't have pytest-asyncio would fail on the unknown option.

This unblocks other PRs, e.g. #1820. #1814 ignores these warnings in pyproject.toml instead; I'll drop that from #1814 once this is merged.

AI assistance: this change was made with Claude Code.

@github-actions github-actions Bot added the type/test PR title type: test (set automatically) label Nov 5, 2026
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
@ariostas
ariostas force-pushed the test/ignore-pytest-9.2-warnings branch from ccd4740 to 5622632 Compare November 5, 2026 16:27
@ariostas ariostas changed the title test: ignore two plugin deprecation warnings from pytest 9.2 ci: fix test startup with pytest 9.2 without ignoring its warnings Nov 5, 2026
@github-actions github-actions Bot added type/ci PR title type: ci (set automatically) and removed type/test PR title type: test (set automatically) labels Nov 5, 2026
@ariostas ariostas changed the title ci: fix test startup with pytest 9.2 without ignoring its warnings ci: fix test startup with pytest 9.2 Nov 5, 2026
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.03%. Comparing base (7e9b39e) to head (66167b3).

Additional details and impacted files

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
@ariostas
ariostas marked this pull request as ready for review November 5, 2026 17:21
@ariostas
ariostas merged commit b4acc0f into scikit-hep:main Nov 6, 2026
22 of 23 checks passed
ariostas added a commit to sumitsaraswat362/uproot5 that referenced this pull request Nov 10, 2026
Compute the per-tag cluster offsets with bincount/cumsum instead of a
per-cluster Python loop, skip padding before the first cluster, and
document that switch columns are CPU-only (CuPy has no structured dtypes).

Drop the pytest<9.2.0 pin, which scikit-hep#1821 made unnecessary. In the tests, look
up the switch column by type, add an end-to-end test with None entries, and
cover padding, absent tag 0, and single-cluster cases.

Assisted-by: Claude Code:claude-opus-5-5
ariostas added a commit that referenced this pull request Nov 10, 2026
…1818)

* fix: offset variant switch column indices across clusters

* test: add unit coverage for variant cluster combining edge cases

* ci: pin pytest below 9.2.0 to resolve plugin incompatibilities

* ci: re-trigger test matrix

* perf(rntuple): use running accumulator for variant switch cluster offsets

* fix(rntuple): vectorize variant switch index offsets and tighten tests

Compute the per-tag cluster offsets with bincount/cumsum instead of a
per-cluster Python loop, skip padding before the first cluster, and
document that switch columns are CPU-only (CuPy has no structured dtypes).

Drop the pytest<9.2.0 pin, which #1821 made unnecessary. In the tests, look
up the switch column by type, add an end-to-end test with None entries, and
cover padding, absent tag 0, and single-cluster cases.

Assisted-by: Claude Code:claude-opus-5-5

---------

Co-authored-by: Andres Rios Tascon <ariostas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/ci PR title type: ci (set automatically)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants