[Python-checkins] GH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (#103626)
kumaraditya303
webhook-mailer at python.org
Wed Apr 19 06:22:10 EDT 2023
https://github.com/python/cpython/commit/da2273fec7b1644786b9616592b53b04fdec4024
commit: da2273fec7b1644786b9616592b53b04fdec4024
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2023-04-19T15:51:53+05:30
summary:
GH-88342: clarify that `asyncio.as_completed` accepts generators yielding tasks (#103626)
files:
M Doc/library/asyncio-task.rst
M Doc/whatsnew/3.12.rst
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 41d09e1e7970..b81d89acf7fd 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 bd95bfeea80c..b3bb065741d0 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
More information about the Python-checkins
mailing list