Sourced from pytest-asyncio's releases.
pytest-asyncio v1.4.0
1.4.0 - 2026-05-26
Deprecated
- Overriding the event_loop_policy fixture is deprecated. Use the
pytest_asyncio_loop_factorieshook instead. (#1419)Added
Added the
pytest_asyncio_loop_factorieshook to parametrize asyncio tests with custom event loop factories.The hook returns a mapping of factory names to loop factories, and
pytest.mark.asyncio(loop_factories=[...])selects a subset of configured factories per test. When a single factory is configured, test names are unchanged.Synchronous
@pytest_asyncio.fixturefunctions now see the correct event loop when custom loop factories are configured, even when test code disrupts the current event loop (e.g., viaasyncio.run()orasyncio.set_event_loop(None)). (#1164)Changed
- Improved the readability of the warning message that is displayed when
asyncio_default_fixture_loop_scopeis unset (#1298)- Only import
asyncio.AbstractEventLoopPolicyfor type checking to avoid raising a DeprecationWarning. (#1394)- Updated minimum supported pytest version to v8.4.0. (#1397)
Fixed
- Fixed a
ResourceWarning: unclosed event loopwarning that could occur when a synchronous test calledasyncio.run()or otherwise unset the current event loop after pytest-asyncio had run an async test or fixture. (#724)Notes for Downstream Packagers
- Added dependency on
sphinx-tabs >= 3.5to organize documentation examples into tabs. (#1395)pytest-asyncio v1.4.0a2
1.4.0a2 - 2026-05-02
Deprecated
- Overriding the event_loop_policy fixture is deprecated. Use the
pytest_asyncio_loop_factorieshook instead. (#1419)Added
Added the
pytest_asyncio_loop_factorieshook to parametrize asyncio tests with custom event loop factories.The hook returns a mapping of factory names to loop factories, and
pytest.mark.asyncio(loop_factories=[...])selects a subset of configured factories per test. When a single factory is configured, test names are unchanged on pytest 8.4+.Synchronous
@pytest_asyncio.fixturefunctions now see the correct event loop when custom loop factories are configured, even when test code disrupts the current event loop (e.g., viaasyncio.run()orasyncio.set_event_loop(None)). (#1164)Changed
... (truncated)
6e14cd2
chore: Prepare release of v1.4.0.4b900fb
Build(deps): Bump codecov/codecov-action from 6.0.0 to 6.0.1ab9f632
Build(deps): Bump zipp from 3.23.1 to 4.1.0a56fc77
Build(deps): Bump hypothesis from 6.152.6 to 6.152.8e8bae9b
Build(deps): Bump requests from 2.34.0 to 2.34.2fc43340
Build(deps): Bump idna from 3.14 to 3.15762eaf5
Build(deps): Bump jaraco-functools from 4.4.0 to 4.5.0b62e222
Build(deps): Bump click from 8.3.3 to 8.4.09190447
Build(deps): Bump pydantic from 2.13.3 to 2.13.482a393c
ci: Remove unnecessary debug output.