unstale

pypi / pytest-asyncio

pytest-asyncio

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

3 breaking1 deprecations3 new APIs and options1 performance1 behavior and defaults1 tooling9 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 119 changes

Breaking changes 3

Deprecations 1

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

    1.4.0release notes

New APIs and options 3

  • The fixture-scope value makes an asynchronous fixture without loop_scope use its scope as its loop scope, matching the behavior of an unset option in pytest-asyncio 1.x.

    1.5.0release notes

  • 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

Performance 1

  • Scoped event loops are created once rather than per scope, reducing the number of fixtures and speeding up collection time.

    1.0.0release notes

Behavior and default changes 1

  • The loop_scope argument no longer requires a pytest Collector at the specified scope.

    1.0.0release notes

Tooling 1

Fixes and other changes 9

  • Invalid arguments to the asyncio marker, including an invalid loop_scope, are reported with a message naming the test instead of a traceback.

    1.5.0release notes

  • AsyncIterable is now allowed as a return type for asynchronous generator fixtures decorated with pytest_asyncio.fixture.

    1.4.1release notes

  • Support for Python 3.15 was declared.

    1.4.1release notes

  • 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

  • Import errors with this pytest option are now suppressed.

    1.0.0release notes

  • Fixed a "fixture not found" error in connection with package-scoped loops.

    1.0.0release notes

  • Preliminary support for Python 3.14 was added.

    1.0.0release notes

  • Fixed an error caused when using pytest's --setup-plan option.

    1.0.0release notes