Pytest-asyncio

Latest version: v0.26.0

Safety actively analyzes 722460 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 11

0.26.0

- Adds configuration option that sets default event loop scope for all tests [793](https://github.com/pytest-dev/pytest-asyncio/issues/793)
- Improved type annotations for `pytest_asyncio.fixture` [1045](https://github.com/pytest-dev/pytest-asyncio/pull/1045)
- Added `typing-extensions` as additional dependency for Python `<3.10` [1045](https://github.com/pytest-dev/pytest-asyncio/pull/1045)

0.25.3

- Avoid errors in cleanup of async generators when event loop is already closed [1040](https://github.com/pytest-dev/pytest-asyncio/issues/1040)

0.25.2

- Call `loop.shutdown_asyncgens()` before closing the event loop to ensure async generators are closed in the same manner as `asyncio.run` does [1034](https://github.com/pytest-dev/pytest-asyncio/pull/1034)

0.25.1

- Fixes an issue that caused a broken event loop when a function-scoped test was executed in between two tests with wider loop scope [950](https://github.com/pytest-dev/pytest-asyncio/issues/950)
- Improves test collection speed in auto mode [1020](https://github.com/pytest-dev/pytest-asyncio/pull/1020)
- Corrects the warning that is emitted upon redefining the event_loop fixture

0.25.0

- Deprecated: Added warning when asyncio test requests async `pytest.fixture` in strict mode. This will become an error in a future version of flake8-asyncio. [979](https://github.com/pytest-dev/pytest-asyncio/pull/979)
- Updates the error message about _pytest.mark.asyncio_'s _scope_ keyword argument to say _loop_scope_ instead. [1004](https://github.com/pytest-dev/pytest-asyncio/pull/1004)
- Verbose log displays correct parameter name: asyncio_default_fixture_loop_scope [990](https://github.com/pytest-dev/pytest-asyncio/pull/990)
- Propagates _contextvars_ set in async fixtures to other fixtures and tests on Python 3.11 and above. [1008](https://github.com/pytest-dev/pytest-asyncio/pull/1008)

0.24.0

- Adds an optional *loop_scope* keyword argument to *pytest.mark.asyncio*. This argument controls which event loop is used to run the marked async test. [706](https://github.com/pytest-dev/pytest-asyncio/issues/706), [#871](https://github.com/pytest-dev/pytest-asyncio/issues/871)
- Deprecates the optional *scope* keyword argument to *pytest.mark.asyncio* for API consistency with ``pytest_asyncio.fixture``. Users are encouraged to use the *loop_scope* keyword argument, which does exactly the same.
- Raises an error when passing *scope* or *loop_scope* as a positional argument to ``pytest.mark.asyncio``. [812](https://github.com/pytest-dev/pytest-asyncio/issues/812)

Page 1 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.