-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-95180: Add TaskGroup
and Runner
to AsyncIO API Index
#95189
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
Conversation
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Misc/NEWS.d/next/Documentation/2022-07-24-05-48-14.gh-issue-95180.z8e649.rst
Outdated
Show resolved
Hide resolved
The change is very small no news entry is required, I added |
Doc/library/asyncio-api-index.rst
Outdated
* - :class:`TaskGroup` | ||
- Holds a group of tasks. | ||
|
||
* - :class:`Runner` | ||
- Manages multiple function calls. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend re-ordering these entries and rewording them eg:
Utilities to run asyncio programs, create Tasks, and
await on multiple things with timeouts.
.. list-table::
:widths: 50 50
:class: full-width-table
* - :func:`run`
- Create an event loop, run one async function, and close the loop.
* - :class:`Runner`
- A context manager to create an event loop, run one or more async functions, and close the loop.
* - :class:`TaskGroup`
- Combines a task creation API with a convenient and reliable way to wait for all tasks in the group to finish.
* - :func:`create_task`
- Start an asyncio Task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifically Runner
should be introduced at the same time as run
and TaskGroup
should be introduced before create_task
NEWS entry is skipped.
reordering and rewording
Thanks! Let me know if it fits better now. |
Co-authored-by: Thomas Grainger <[email protected]>
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the issue, it was brought up that timeout()
also belongs in this list. I agree.
I have made the requested changes; please review again. |
Thanks for making the requested changes! @gvanrossum: please review the changes made to this pull request. |
Thanks @siphc for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-96511 is a backport of this pull request to the 3.11 branch. |
…thonGH-95189) Also rearrange some items in the list. Co-authored-by: Thomas Grainger <[email protected]> (cherry picked from commit 2a9e4e4) Co-authored-by: siph <[email protected]>
Also rearrange some items in the list. Co-authored-by: Thomas Grainger <[email protected]> (cherry picked from commit 2a9e4e4) Co-authored-by: siph <[email protected]>
#95180