Skip to content

Commit da2273f

Browse files
GH-88342: clarify that asyncio.as_completed accepts generators yielding tasks (#103626)
1 parent d1e4917 commit da2273f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Doc/library/asyncio-task.rst

+3
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,9 @@ Waiting Primitives
829829
Deprecation warning is emitted if not all awaitable objects in the *aws*
830830
iterable are Future-like objects and there is no running event loop.
831831

832+
.. versionchanged:: 3.12
833+
Added support for generators yielding tasks.
834+
832835

833836
Running in Threads
834837
==================

Doc/whatsnew/3.12.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ asyncio
250250
:mod:`asyncio` does not support legacy generator-based coroutines.
251251
(Contributed by Kumar Aditya in :gh:`102748`.)
252252

253-
* :func:`asyncio.wait` now accepts generators yielding tasks.
253+
* :func:`asyncio.wait` and :func:`asyncio.as_completed` now accepts generators
254+
yielding tasks.
254255
(Contributed by Kumar Aditya in :gh:`78530`.)
255256

256257
csv

0 commit comments

Comments
 (0)