Skip to content

GH-88342: clarify that asyncio.as_completed accepts generators yielding tasks #103626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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