Skip to content

Commit

Permalink
GH-88342: clarify that asyncio.as_completed accepts generators yiel…
Browse files Browse the repository at this point in the history
…ding tasks (#103626)
  • Loading branch information
kumaraditya303 authored Apr 19, 2023
1 parent d1e4917 commit da2273f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,9 @@ Waiting Primitives
Deprecation warning is emitted if not all awaitable objects in the *aws*
iterable are Future-like objects and there is no running event loop.

.. versionchanged:: 3.12
Added support for generators yielding tasks.


Running in Threads
==================
Expand Down
3 changes: 2 additions & 1 deletion Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ asyncio
:mod:`asyncio` does not support legacy generator-based coroutines.
(Contributed by Kumar Aditya in :gh:`102748`.)

* :func:`asyncio.wait` now accepts generators yielding tasks.
* :func:`asyncio.wait` and :func:`asyncio.as_completed` now accepts generators
yielding tasks.
(Contributed by Kumar Aditya in :gh:`78530`.)

csv
Expand Down

0 comments on commit da2273f

Please sign in to comment.