You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrade to pytest 9.2.0 and a supported pytest-asyncio version #2114
The development dependencies currently constrain pytest-asyncio to >=0.21,<0.22. pytest-asyncio 0.21.2 accesses the private pytest attribute FixtureManager._arg2fixturedefs, which was removed in pytest 9.2.0. With that combination, test collection fails with:
AttributeError: FixtureManager object has no attribute _arg2fixturedefs
The latest-dependencies CI job began selecting pytest 9.2.0 when it crossed the repository two-week release cutoff. PR #2113 caps pytest below 9.2 as a temporary workaround.
Proposed work
Upgrade pytest-asyncio to a supported release compatible with pytest 9.2.0 and the Python versions supported by this repository.
Migrate the session-scoped event_loop override in tests/conftest.py to the supported loop-scope configuration. pytest-asyncio 1.0 removed the old event_loop fixture mechanism.
Preserve the loop sharing required by session-scoped async fixtures and verify fixture setup, teardown, and test isolation.
Remove the temporary pytest<9.2 cap and refresh uv.lock without unrelated dependency churn.
Account for the two-week dependency cutoff when choosing the plugin release.
Validation
Test collection succeeds with pytest 9.2.0 and the chosen plugin version.
The full test suite and latest-dependencies CI job pass, including workflow-environment tests and the supported Python/platform matrix.
Async resources are cleaned up without new loop-scope, closed-loop, or resource-leak failures.
pytest-asyncio 1.4.1.post1 is a candidate: its metadata allows pytest>=8.4 without an upper bound. Compatibility with this repository still needs to be validated.
Activity