Debian Codegraph @

docs/reference/changelog.rst

raw
1 =========
2 Changelog
3 =========
4
5 All notable changes to this project will be documented in this file.
6
7 The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.1.0/>`__, and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`__.
8
9 This project uses `towncrier <https://towncrier.readthedocs.io/>`__ for changelog management and the changes for the upcoming release can be found in https://github.com/pytest-dev/pytest-asyncio/tree/main/changelog.d/.
10
11 .. towncrier release notes start
12
13 `1.4.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.4.0>`_ - 2026-05-26
14 ===============================================================================
15
16 Deprecated
17 ----------
18
19 - 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>`_)
51
52
53 `1.3.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.3.0>`_ - 2025-11-10
54 ===============================================================================
55
56 Removed
57 -------
58
59 - Support for Python 3.9 (`#1278 <https://github.com/pytest-dev/pytest-asyncio/issues/1278>`_)
60
61
62 Added
63 -----
64
65 - Support for pytest 9 (`#1279 <https://github.com/pytest-dev/pytest-asyncio/issues/1279>`_)
66
67
68 Notes for Downstream Packagers
69 ------------------------------
70
71 - Tested Python versions include free threaded Python 3.14t (`#1274 <https://github.com/pytest-dev/pytest-asyncio/issues/1274>`_)
72 - Tests are run in the same pytest process, instead of spawning a subprocess with `pytest.Pytester.runpytest_subprocess`. This prevents the test suite from accidentally using a system installation of pytest-asyncio, which could result in test errors. (`#1275 <https://github.com/pytest-dev/pytest-asyncio/issues/1275>`_)
73
74
75 `1.2.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.2.0>`_ - 2025-09-12
76 ===============================================================================
77
78 Added
79 -----
80
81 - ``--asyncio-debug`` CLI option and ``asyncio_debug`` configuration option to enable asyncio debug mode for the default event loop. (`#980 <https://github.com/pytest-dev/pytest-asyncio/issues/980>`_)
82 - A ``pytest.UsageError`` for invalid configuration values of ``asyncio_default_fixture_loop_scope`` and ``asyncio_default_test_loop_scope``. (`#1189 <https://github.com/pytest-dev/pytest-asyncio/issues/1189>`_)
83 - Compatibility with the `Pyright` type checker (`#731 <https://github.com/pytest-dev/pytest-asyncio/issues/731>`_)
84
85
86 Fixed
87 -----
88
89 - ``RuntimeError: There is no current event loop in thread 'MainThread'`` when any test unsets the event loop (such as when using ``asyncio.run`` and ``asyncio.Runner``). (`#1177 <https://github.com/pytest-dev/pytest-asyncio/issues/1177>`_)
90 - Deprecation warning when decorating an asynchronous fixture with ``@pytest.fixture`` in `strict` mode. The warning message now refers to the correct package. (`#1198 <https://github.com/pytest-dev/pytest-asyncio/issues/1198>`_)
91
92
93 Notes for Downstream Packagers
94 ------------------------------
95
96 - Bump the minimum required version of tox to v4.28. This change is only relevant if you use the ``tox.ini`` file provided by pytest-asyncio to run tests.
97 - Extend dependency on typing-extensions>=4.12 from Python<3.10 to Python<3.13.
98
99
100 `1.1.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.1.0>`_ - 2025-07-16
101 ===============================================================================
102
103 Added
104 -----
105
106 - Propagation of ContextVars from async fixtures to other fixtures and tests on Python 3.10 and older (`#127 <https://github.com/pytest-dev/pytest-asyncio/issues/127>`_)
107 - Cancellation of tasks when the `loop_scope` ends (`#200 <https://github.com/pytest-dev/pytest-asyncio/issues/200>`_)
108 - Warning when the current event loop is closed by a test
109
110
111 Fixed
112 -----
113
114 - Error about missing loop when calling functions requiring a loop in the `finally` clause of a task (`#878 <https://github.com/pytest-dev/pytest-asyncio/issues/878>`_)
115 - An error that could cause duplicate warnings to be issued
116
117
118 Notes for Downstream Packagers
119 ------------------------------
120
121 - Added runtime dependency on `backports.asyncio.runner <https://pypi.org/project/backports.asyncio.runner/>`__ for use with Python 3.10 and older
122
123
124 `1.0.0 <https://github.com/pytest-dev/pytest-asyncio/tree/1.0.0>`_ - 2025-05-26
125 ===============================================================================
126
127 .. seealso::
128
129 :ref:`How to migrate from pytest-asyncio v0.23 <how_to_guides/migrate_from_0_23>`
130
131 Removed
132 -------
133
134 - The deprecated *event_loop* fixture. (`#1106 <https://github.com/pytest-dev/pytest-asyncio/issues/1106>`_)
135
136
137 Added
138 -----
139
140 - Prelimiary support for Python 3.14 (`#1025 <https://github.com/pytest-dev/pytest-asyncio/issues/1025>`_)
141
142
143 Changed
144 -------
145
146 - Scoped event loops (e.g. module-scoped loops) are created once rather than per scope (e.g. per module). This reduces the number of fixtures and speeds up collection time, especially for large test suites. (`#1107 <https://github.com/pytest-dev/pytest-asyncio/issues/1107>`_)
147 - The *loop_scope* argument to ``pytest.mark.asyncio`` no longer forces that a pytest Collector exists at the level of the specified scope. For example, a test function marked with ``pytest.mark.asyncio(loop_scope="class")`` no longer requires a class surrounding the test. This is consistent with the behavior of the *scope* argument to ``pytest_asyncio.fixture``. (`#1112 <https://github.com/pytest-dev/pytest-asyncio/issues/1112>`_)
148
149
150 Fixed
151 -----
152
153 - An error caused when using pytest's `--setup-plan` option. (`#630 <https://github.com/pytest-dev/pytest-asyncio/issues/630>`_)
154 - Unsuppressed import errors with pytest option ``--doctest-ignore-import-errors`` (`#797 <https://github.com/pytest-dev/pytest-asyncio/issues/797>`_)
155 - A "fixture not found" error in connection with package-scoped loops (`#1052 <https://github.com/pytest-dev/pytest-asyncio/issues/1052>`_)
156
157
158 Notes for Downstream Packagers
159 ------------------------------
160
161 - Removed a test that had an ordering dependency on other tests. (`#1114 <https://github.com/pytest-dev/pytest-asyncio/issues/1114>`_)
162
163
164 0.26.0 (2025-03-25)
165 ===================
166 - Adds configuration option that sets default event loop scope for all tests `#793 <https://github.com/pytest-dev/pytest-asyncio/issues/793>`_
167 - Improved type annotations for ``pytest_asyncio.fixture`` `#1045 <https://github.com/pytest-dev/pytest-asyncio/pull/1045>`_
168 - Added ``typing-extensions`` as additional dependency for Python ``<3.10`` `#1045 <https://github.com/pytest-dev/pytest-asyncio/pull/1045>`_
169
170
171 0.25.3 (2025-01-28)
172 ===================
173 - Avoid errors in cleanup of async generators when event loop is already closed `#1040 <https://github.com/pytest-dev/pytest-asyncio/issues/1040>`_
174
175
176 0.25.2 (2025-01-08)
177 ===================
178 - 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>`_
179
180
181 0.25.1 (2025-01-02)
182 ===================
183 - 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>`_
184 - Improves test collection speed in auto mode `#1020 <https://github.com/pytest-dev/pytest-asyncio/pull/1020>`_
185 - Corrects the warning that is emitted upon redefining the event_loop fixture
186
187
188 0.25.0 (2024-12-13)
189 ===================
190 - Deprecated: Added warning when asyncio test requests async ``@pytest.fixture`` in strict mode. This will become an error in a future version of pytest-asyncio. `#979 <https://github.com/pytest-dev/pytest-asyncio/pull/979>`_
191 - 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>`_
192 - Verbose log displays correct parameter name: asyncio_default_fixture_loop_scope `#990 <https://github.com/pytest-dev/pytest-asyncio/pull/990>`_
193 - 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>`_
194
195
196 0.24.0 (2024-08-22)
197 ===================
198 - BREAKING: Updated minimum supported pytest version to v8.2.0
199 - 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 <https://github.com/pytest-dev/pytest-asyncio/pull/871>`_
200 - 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.
201 - 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>`_
202 - Fixes a bug that caused module-scoped async fixtures to fail when reused in other modules `#862 <https://github.com/pytest-dev/pytest-asyncio/issues/862>`_ `#668 <https://github.com/pytest-dev/pytest-asyncio/issues/668>`_
203 - Added the ``asyncio_default_fixture_loop_scope`` configuration option `c74d1c3 <https://github.com/pytest-dev/pytest-asyncio/commit/c74d1c3fba1afac0b8316763257c915bfba5f5e3>`_
204
205
206 0.23.8 (2024-07-17)
207 ===================
208 - Fixes a bug that caused duplicate markers in async tests `#813 <https://github.com/pytest-dev/pytest-asyncio/issues/813>`_
209 - Declare support for Python 3.13
210
211 Known issues
212 ------------
213 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.
214
215
216 0.23.7 (2024-05-19)
217 ===================
218 - Silence deprecation warnings about unclosed event loops that occurred with certain CPython patch releases `#817 <https://github.com/pytest-dev/pytest-asyncio/pull/817>`_
219
220 Known issues
221 ------------
222 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.
223
224
225 0.23.6 (2024-03-19)
226 ===================
227 - Fix compatibility with pytest 8.2 `#800 <https://github.com/pytest-dev/pytest-asyncio/pull/800>`_
228
229 Known issues
230 ------------
231 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.
232
233
234 0.23.5 (2024-02-09)
235 ===================
236 - Declare compatibility with pytest 8 `#737 <https://github.com/pytest-dev/pytest-asyncio/issues/737>`_
237 - Fix typing errors with recent versions of mypy `#769 <https://github.com/pytest-dev/pytest-asyncio/issues/769>`_
238 - Prevent DeprecationWarning about internal use of `asyncio.get_event_loop()` from affecting test cases `#757 <https://github.com/pytest-dev/pytest-asyncio/issues/757>`_
239
240 Known issues
241 ------------
242 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.
243
244
245 0.23.4 (2024-01-28)
246 ===================
247 - pytest-asyncio no longer imports additional, unrelated packages during test collection `#729 <https://github.com/pytest-dev/pytest-asyncio/issues/729>`_
248 - Addresses further issues that caused an internal pytest error during test collection
249 - Declares incompatibility with pytest 8 `#737 <https://github.com/pytest-dev/pytest-asyncio/issues/737>`_
250
251 Known issues
252 ------------
253 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.
254
255 0.23.3 (2024-01-01)
256 ===================
257 - Fixes a bug that caused event loops to be closed prematurely when using async generator fixtures with class scope or wider in a function-scoped test `#706 <https://github.com/pytest-dev/pytest-asyncio/issues/706>`_
258 - Fixes various bugs that caused an internal pytest error during test collection `#711 <https://github.com/pytest-dev/pytest-asyncio/issues/711>`_ `#713 <https://github.com/pytest-dev/pytest-asyncio/issues/713>`_ `#719 <https://github.com/pytest-dev/pytest-asyncio/issues/719>`_
259
260 Known issues
261 ------------
262 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.
263
264
265 0.23.2 (2023-12-04)
266 ===================
267 - Fixes a bug that caused an internal pytest error when collecting .txt files `#703 <https://github.com/pytest-dev/pytest-asyncio/issues/703>`_
268
269
270 0.23.1 (2023-12-03)
271 ===================
272 - Fixes a bug that caused an internal pytest error when using module-level skips `#701 <https://github.com/pytest-dev/pytest-asyncio/issues/701>`_
273
274
275 0.23.0 (2023-12-03)
276 ===================
277 This release is backwards-compatible with v0.21.
278 Changes are non-breaking, unless you upgrade from v0.22.
279
280 .. seealso::
281
282 :ref:`How to migrate from pytest-asyncio v0.21 <how_to_guides/migrate_from_0_21>`
283
284 - BREAKING: The *asyncio_event_loop* mark has been removed. Event loops with class, module, package, and session scopes can be requested via the *scope* keyword argument to the _asyncio_ mark.
285 - Introduces the *event_loop_policy* fixture which allows testing with non-default or multiple event loops `#662 <https://github.com/pytest-dev/pytest-asyncio/pull/662>`_
286 - Introduces ``pytest_asyncio.is_async_test`` which returns whether a test item is managed by pytest-asyncio `#376 <https://github.com/pytest-dev/pytest-asyncio/issues/376>`_
287 - Removes and *pytest-trio,* *mypy,* and *flaky* from the test dependencies `#620 <https://github.com/pytest-dev/pytest-asyncio/pull/620>`_, `#674 <https://github.com/pytest-dev/pytest-asyncio/pull/674>`_, `#678 <https://github.com/pytest-dev/pytest-asyncio/pull/678>`_,
288
289 0.22.0 (2023-10-31)
290 ===================
291 This release has been yanked from PyPI due to fundamental issues with the _asyncio_event_loop_ mark.
292
293 - Class-scoped and module-scoped event loops can be requested
294 via the _asyncio_event_loop_ mark. `#620 <https://github.com/pytest-dev/pytest-asyncio/pull/620>`_
295 - Deprecate redefinition of the `event_loop` fixture. `#587 <https://github.com/pytest-dev/pytest-asyncio/issues/531>`_
296 Users requiring a class-scoped or module-scoped asyncio event loop for their tests
297 should mark the corresponding class or module with `asyncio_event_loop`.
298 - Test items based on asynchronous generators always exit with *xfail* status and emit a warning during the collection phase. This behavior is consistent with synchronous yield tests. `#642 <https://github.com/pytest-dev/pytest-asyncio/issues/642>`__
299 - Remove support for Python 3.7
300 - Declare support for Python 3.12
301
302 0.21.2 (2024-04-29)
303 ===================
304 - Fix compatibility with pytest 8.2. Backport of `#800 <https://github.com/pytest-dev/pytest-asyncio/pull/800>`_ to pytest-asyncio v0.21 for users who are unable to upgrade to a more recent version (see `#706`_)
305
306 0.21.1 (2023-07-12)
307 ===================
308 - Output a proper error message when an invalid ``asyncio_mode`` is selected.
309 - Extend warning message about unclosed event loops with additional possible cause.
310 `#531 <https://github.com/pytest-dev/pytest-asyncio/issues/531>`_
311 - Previously, some tests reported "skipped" or "xfailed" as a result. Now all tests report a "success" result.
312
313 0.21.0 (2023-03-19)
314 ===================
315 - Drop compatibility with pytest 6.1. Pytest-asyncio now depends on pytest 7.0 or newer.
316 - pytest-asyncio cleans up any stale event loops when setting up and tearing down the
317 event_loop fixture. This behavior has been deprecated and pytest-asyncio emits a
318 DeprecationWarning when tearing down the event_loop fixture and current event loop
319 has not been closed.
320
321 0.20.3 (2022-12-08)
322 ===================
323 - Prevent DeprecationWarning to bubble up on CPython 3.10.9 and 3.11.1.
324 `#460 <https://github.com/pytest-dev/pytest-asyncio/issues/460>`_
325
326 0.20.2 (2022-11-11)
327 ===================
328 - Fixes an issue with async fixtures that are defined as methods on a test class not being rebound to the actual test instance. `#197 <https://github.com/pytest-dev/pytest-asyncio/issues/197>`_
329 - Replaced usage of deprecated ``@pytest.mark.tryfirst`` with ``@pytest.hookimpl(tryfirst=True)`` `#438 <https://github.com/pytest-dev/pytest-asyncio/pull/438>`_
330
331 0.20.1 (2022-10-21)
332 ===================
333 - Fixes an issue that warned about using an old version of pytest, even though the most recent version was installed. `#430 <https://github.com/pytest-dev/pytest-asyncio/issues/430>`_
334
335 0.20.0 (2022-10-21)
336 ===================
337 - BREAKING: Removed *legacy* mode. If you're upgrading from v0.19 and you haven't configured ``asyncio_mode = legacy``, you can upgrade without taking any additional action. If you're upgrading from an earlier version or you have explicitly enabled *legacy* mode, you need to switch to *auto* or *strict* mode before upgrading to this version.
338 - Deprecate use of pytest v6.
339 - Fixed an issue which prevented fixture setup from being cached. `#404 <https://github.com/pytest-dev/pytest-asyncio/pull/404>`_
340
341 0.19.0 (2022-07-13)
342 ===================
343 - BREAKING: The default ``asyncio_mode`` is now *strict*. `#293 <https://github.com/pytest-dev/pytest-asyncio/issues/293>`_
344 - Removes `setup.py` since all relevant configuration is present `setup.cfg`. Users requiring an editable installation of pytest-asyncio need to use pip v21.1 or newer. `#283 <https://github.com/pytest-dev/pytest-asyncio/issues/283>`_
345 - Declare support for Python 3.11.
346
347 0.18.3 (2022-03-25)
348 ===================
349 - Adds `pytest-trio <https://pypi.org/project/pytest-trio/>`_ to the test dependencies
350 - Fixes a bug that caused pytest-asyncio to try to set up async pytest_trio fixtures in strict mode. `#298 <https://github.com/pytest-dev/pytest-asyncio/issues/298>`_
351
352 0.18.2 (2022-03-03)
353 ===================
354 - Fix asyncio auto mode not marking static methods. `#295 <https://github.com/pytest-dev/pytest-asyncio/issues/295>`_
355 - Fix a compatibility issue with Hypothesis 6.39.0. `#302 <https://github.com/pytest-dev/pytest-asyncio/issues/302>`_
356
357 0.18.1 (2022-02-10)
358 ===================
359 - Fixes a regression that prevented async fixtures from working in synchronous tests. `#286 <https://github.com/pytest-dev/pytest-asyncio/issues/286>`_
360
361 0.18.0 (2022-02-07)
362 ===================
363
364 - Raise a warning if @pytest.mark.asyncio is applied to non-async function. `#275 <https://github.com/pytest-dev/pytest-asyncio/issues/275>`_
365 - Support parametrized ``event_loop`` fixture. `#278 <https://github.com/pytest-dev/pytest-asyncio/issues/278>`_
366
367 0.17.2 (2022-01-17)
368 ===================
369
370 - Require ``typing-extensions`` on Python<3.8 only. `#269 <https://github.com/pytest-dev/pytest-asyncio/issues/269>`_
371 - Fix a regression in tests collection introduced by 0.17.1, the plugin works fine with non-python tests again. `#267 <https://github.com/pytest-dev/pytest-asyncio/issues/267>`_
372
373
374 0.17.1 (2022-01-16)
375 ===================
376 - Fixes a bug that prevents async Hypothesis tests from working without explicit ``asyncio`` marker when ``--asyncio-mode=auto`` is set. `#258 <https://github.com/pytest-dev/pytest-asyncio/issues/258>`_
377 - Fixed a bug that closes the default event loop if the loop doesn't exist `#257 <https://github.com/pytest-dev/pytest-asyncio/issues/257>`_
378 - Added type annotations. `#198 <https://github.com/pytest-dev/pytest-asyncio/issues/198>`_
379 - Show asyncio mode in pytest report headers. `#266 <https://github.com/pytest-dev/pytest-asyncio/issues/266>`_
380 - Relax ``asyncio_mode`` type definition; it allows to support pytest 6.1+. `#262 <https://github.com/pytest-dev/pytest-asyncio/issues/262>`_
381
382 0.17.0 (2022-01-13)
383 ===================
384 - `pytest-asyncio` no longer alters existing event loop policies. `#168 <https://github.com/pytest-dev/pytest-asyncio/issues/168>`_, `#188 <https://github.com/pytest-dev/pytest-asyncio/issues/168>`_
385 - Drop support for Python 3.6
386 - Fixed an issue when pytest-asyncio was used in combination with `flaky` or inherited asynchronous Hypothesis tests. `#178 <https://github.com/pytest-dev/pytest-asyncio/issues/178>`_ `#231 <https://github.com/pytest-dev/pytest-asyncio/issues/231>`_
387 - Added `flaky <https://pypi.org/project/flaky/>`_ to test dependencies
388 - Added ``unused_udp_port`` and ``unused_udp_port_factory`` fixtures (similar to ``unused_tcp_port`` and ``unused_tcp_port_factory`` counterparts. `#99 <https://github.com/pytest-dev/pytest-asyncio/issues/99>`_
389 - Added the plugin modes: *strict*, *auto*, and *legacy*. See `documentation <https://github.com/pytest-dev/pytest-asyncio#modes>`_ for details. `#125 <https://github.com/pytest-dev/pytest-asyncio/issues/125>`_
390 - Correctly process ``KeyboardInterrupt`` during async fixture setup phase `#219 <https://github.com/pytest-dev/pytest-asyncio/issues/219>`_
391
392 0.16.0 (2021-10-16)
393 ===================
394 - Add support for Python 3.10
395
396 0.15.1 (2021-04-22)
397 ===================
398 - Hotfix for errors while closing event loops while replacing them.
399 `#209 <https://github.com/pytest-dev/pytest-asyncio/issues/209>`_
400 `#210 <https://github.com/pytest-dev/pytest-asyncio/issues/210>`_
401
402 0.15.0 (2021-04-19)
403 ===================
404 - Add support for Python 3.9
405 - Abandon support for Python 3.5. If you still require support for Python 3.5, please use pytest-asyncio v0.14 or earlier.
406 - Set ``unused_tcp_port_factory`` fixture scope to 'session'.
407 `#163 <https://github.com/pytest-dev/pytest-asyncio/pull/163>`_
408 - Properly close event loops when replacing them.
409 `#208 <https://github.com/pytest-dev/pytest-asyncio/issues/208>`_
410
411 0.14.0 (2020-06-24)
412 ===================
413 - Fix `#162 <https://github.com/pytest-dev/pytest-asyncio/issues/162>`_, and ``event_loop`` fixture behavior now is coherent on all scopes.
414 `#164 <https://github.com/pytest-dev/pytest-asyncio/pull/164>`_
415
416 0.12.0 (2020-05-04)
417 ===================
418 - Run the event loop fixture as soon as possible. This helps with fixtures that have an implicit dependency on the event loop.
419 `#156 <https://github.com/pytest-dev/pytest-asyncio/pull/156>`_
420
421 0.11.0 (2020-04-20)
422 ===================
423 - Test on 3.8, drop 3.3 and 3.4. Stick to 0.10 for these versions.
424 `#152 <https://github.com/pytest-dev/pytest-asyncio/pull/152>`_
425 - Use the new Pytest 5.4.0 Function API. We therefore depend on pytest >= 5.4.0.
426 `#142 <https://github.com/pytest-dev/pytest-asyncio/pull/142>`_
427 - Better ``pytest.skip`` support.
428 `#126 <https://github.com/pytest-dev/pytest-asyncio/pull/126>`_
429
430 0.10.0 (2019-01-08)
431 ====================
432 - ``pytest-asyncio`` integrates with `Hypothesis <https://hypothesis.readthedocs.io>`_
433 to support ``@given`` on async test functions using ``asyncio``.
434 `#102 <https://github.com/pytest-dev/pytest-asyncio/pull/102>`_
435 - Pytest 4.1 support.
436 `#105 <https://github.com/pytest-dev/pytest-asyncio/pull/105>`_
437
438 0.9.0 (2018-07-28)
439 ==================
440 - Python 3.7 support.
441 - Remove ``event_loop_process_pool`` fixture and
442 ``pytest.mark.asyncio_process_pool`` marker (see
443 https://bugs.python.org/issue34075 for deprecation and removal details)
444
445 0.8.0 (2017-09-23)
446 ==================
447 - Improve integration with other packages (like aiohttp) with more careful event loop handling.
448 `#64 <https://github.com/pytest-dev/pytest-asyncio/pull/64>`_
449
450 0.7.0 (2017-09-08)
451 ==================
452 - Python versions pre-3.6 can use the async_generator library for async fixtures.
453 `#62 <https://github.com/pytest-dev/pytest-asyncio/pull/62>`
454
455 0.6.0 (2017-05-28)
456 ==================
457 - Support for Python versions pre-3.5 has been dropped.
458 - ``pytestmark`` now works on both module and class level.
459 - The ``forbid_global_loop`` parameter has been removed.
460 - Support for async and async gen fixtures has been added.
461 `#45 <https://github.com/pytest-dev/pytest-asyncio/pull/45>`_
462 - The deprecation warning regarding ``asyncio.async()`` has been fixed.
463 `#51 <https://github.com/pytest-dev/pytest-asyncio/pull/51>`_
464
465 0.5.0 (2016-09-07)
466 ==================
467 - Introduced a changelog.
468 `#31 <https://github.com/pytest-dev/pytest-asyncio/issues/31>`_
469 - The ``event_loop`` fixture is again responsible for closing itself.
470 This makes the fixture slightly harder to correctly override, but enables
471 other fixtures to depend on it correctly.
472 `#30 <https://github.com/pytest-dev/pytest-asyncio/issues/30>`_
473 - Deal with the event loop policy by wrapping a special pytest hook,
474 ``pytest_fixture_setup``. This allows setting the policy before fixtures
475 dependent on the ``event_loop`` fixture run, thus allowing them to take
476 advantage of the ``forbid_global_loop`` parameter. As a consequence of this,
477 we now depend on pytest 3.0.
478 `#29 <https://github.com/pytest-dev/pytest-asyncio/issues/29>`_
479
480 0.4.1 (2016-06-01)
481 ==================
482 - Fix a bug preventing the propagation of exceptions from the plugin.
483 `#25 <https://github.com/pytest-dev/pytest-asyncio/issues/25>`_
484
485 0.4.0 (2016-05-30)
486 ==================
487 - Make ``event_loop`` fixtures simpler to override by closing them in the
488 plugin, instead of directly in the fixture.
489 `#21 <https://github.com/pytest-dev/pytest-asyncio/pull/21>`_
490 - Introduce the ``forbid_global_loop`` parameter.
491 `#21 <https://github.com/pytest-dev/pytest-asyncio/pull/21>`_
492
493 0.3.0 (2015-12-19)
494 ==================
495 - Support for Python 3.5 ``async``/``await`` syntax.
496 `#17 <https://github.com/pytest-dev/pytest-asyncio/pull/17>`_
497
498 0.2.0 (2015-08-01)
499 ==================
500 - ``unused_tcp_port_factory`` fixture.
501 `#10 <https://github.com/pytest-dev/pytest-asyncio/issues/10>`_
502
503 0.1.1 (2015-04-23)
504 ==================
505 Initial release.