unstale

pypi / pytest-asyncio

pytest-asyncio

What changed in pytest-asyncio 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

2 breaking1 deprecations2 new APIs and options1 tooling2 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

pytest-asyncio 18 changes

Breaking changes 2

Deprecations 1

  • Overriding the fixture is deprecated; use the pytest_asyncio_loop_factories hook instead.

    1.4.0release notes

New APIs and options 2

  • A hook returns a mapping of factory names to event loop factories, allowing asyncio tests to be parametrized with custom factories.

    1.4.0release notes

  • Select a subset of configured loop factories for a test; when a single factory is configured, test names are unchanged.

    1.4.0release notes

Tooling 1

Fixes and other changes 2

  • Synchronous fixture functions now see the correct event loop with custom loop factories, even if test code disrupts the current loop.

    1.4.0release notes

  • Fixes a ResourceWarning that could occur when a synchronous test called asyncio.run() or otherwise unset the current event loop after an async test or fixture.

    1.4.0release notes