You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Overriding the *event_loop_policy* fixture is deprecated. Use the ``pytest_asyncio_loop_factories`` hook instead. (`#1419 <https://github.com/pytest-dev/pytest-asyncio/issues/1419>`_)
20
+
21
+
22
+
Added
23
+
-----
24
+
25
+
- Added the ``pytest_asyncio_loop_factories`` hook to parametrize asyncio tests with custom event loop factories.
26
+
27
+
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.
28
+
29
+
Synchronous ``@pytest_asyncio.fixture`` functions now see the correct event loop when custom loop factories are configured, even when test code disrupts the current event loop (e.g., via ``asyncio.run()`` or ``asyncio.set_event_loop(None)``). (`#1164 <https://github.com/pytest-dev/pytest-asyncio/issues/1164>`_)
30
+
31
+
32
+
Changed
33
+
-------
34
+
35
+
- Improved the readability of the warning message that is displayed when ``asyncio_default_fixture_loop_scope`` is unset (`#1298 <https://github.com/pytest-dev/pytest-asyncio/issues/1298>`_)
36
+
- Only import ``asyncio.AbstractEventLoopPolicy`` for type checking to avoid raising
37
+
a DeprecationWarning. (`#1394 <https://github.com/pytest-dev/pytest-asyncio/issues/1394>`_)
38
+
- Updated minimum supported pytest version to v8.4.0. (`#1397 <https://github.com/pytest-dev/pytest-asyncio/issues/1397>`_)
39
+
40
+
41
+
Fixed
42
+
-----
43
+
44
+
- Fixed a ``ResourceWarning: unclosed event loop`` warning that could occur when a synchronous test called ``asyncio.run()`` or otherwise unset the current event loop after pytest-asyncio had run an async test or fixture. (`#724 <https://github.com/pytest-dev/pytest-asyncio/issues/724>`_)
45
+
46
+
47
+
Notes for Downstream Packagers
48
+
------------------------------
49
+
50
+
- Added dependency on ``sphinx-tabs >= 3.5`` to organize documentation examples into tabs. (`#1395 <https://github.com/pytest-dev/pytest-asyncio/issues/1395>`_)
0 commit comments