Releases: pytest-dev/pytest-asyncio
pytest-asyncio 0.25.0
0.25.0 (2024-12-13)
- 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 - Updates the error message about pytest.mark.asyncio's scope keyword argument to say loop_scope instead. #1004
- Verbose log displays correct parameter name: asyncio_default_fixture_loop_scope #990
- Propagates contextvars set in async fixtures to other fixtures and tests on Python 3.11 and above. #1008
pytest-asyncio 0.24.0
0.24.0 (2024-08-22)
- BREAKING: Updated minimum supported pytest version to v8.2.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, #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 - Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules #862 #668
pytest-asyncio 0.24.0a1
0.24.0 (UNRELEASED)
- BREAKING: Updated minimum supported pytest version to v8.2.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, #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 - Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules #862 #668
pytest-asyncio 0.24.0a0
0.24.0 (UNRELEASED)
- 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, #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
pytest-asyncio 0.23.8
0.23.8 (2024-07-17)
- Fixes a bug that caused duplicate markers in async tests #813
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-asyncio 0.23.7
0.23.7 (2024-05-19)
- Silence deprecation warnings about unclosed event loops that occurred with certain CPython patch releases #817
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-asyncio 0.21.2
pytest-asyncio 0.23.6
0.23.6 (2024-03-19)
- Fix compatibility with pytest 8.2 #800
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-asyncio 0.23.5.post1
0.23.5 (2024-02-09)
- Declare compatibility with pytest 8 #737
- Fix typing errors with recent versions of mypy #769
- Prevent DeprecationWarning about internal use of
asyncio.get_event_loop()
from affecting test cases #757
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.
pytest-asyncio 0.23.5
0.23.5 (2024-02-09)
- Declare compatibility with pytest 8 #737
- Fix typing errors with recent versions of mypy #769
- Prevent DeprecationWarning about internal use of
asyncio.get_event_loop()
from affecting test cases #757
Known issues
As of v0.23, pytest-asyncio attaches an asyncio event loop to each item of the test suite (i.e. session, packages, modules, classes, functions) and allows tests to be run in those loops when marked accordingly. Pytest-asyncio currently assumes that async fixture scope is correlated with the new event loop scope. This prevents fixtures from being evaluated independently from the event loop scope and breaks some existing test suites (see #706). For example, a test suite may require all fixtures and tests to run in the same event loop, but have async fixtures that are set up and torn down for each module. If you're affected by this issue, please continue using the v0.21 release, until it is resolved.