summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2023-04-19 10:21:53 (GMT)
committerGitHub <noreply@github.com>2023-04-19 10:21:53 (GMT)
commitda2273fec7b1644786b9616592b53b04fdec4024 (patch)
treed446762ef694bf929ea39c884cfc9890511fa4bd
parentd1e4917e06d5638f1a7fa189d6d63ec9c2a27753 (diff)
downloadcpython-da2273fec7b1644786b9616592b53b04fdec4024.zip
cpython-da2273fec7b1644786b9616592b53b04fdec4024.tar.gz
cpython-da2273fec7b1644786b9616592b53b04fdec4024.tar.bz2
GH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (#103626)
-rw-r--r--Doc/library/asyncio-task.rst3
-rw-r--r--Doc/whatsnew/3.12.rst3
2 files changed, 5 insertions, 1 deletions
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 41d09e1..b81d89a 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -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
==================
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index bd95bfe..b3bb065 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -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