From 2add5b80279e3e1dcddee644bfd47a1e8a8c7df7 Mon Sep 17 00:00:00 2001 From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:40:49 +0530 Subject: [PATCH] clarify that `asyncio.as_completed` accepts generators yielding tasks --- Doc/library/asyncio-task.rst | 3 +++ Doc/whatsnew/3.12.rst | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index 41d09e1e79705c..b81d89acf7fd88 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 4165b16ba76441..0ad4d86c3be4d5 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
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: