Skip to content

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

Merged
merged 8 commits into from
Sep 2, 2022
Merged

gh-95180: Add TaskGroup and Runner to AsyncIO API Index #95189

merged 8 commits into from
Sep 2, 2022

Conversation

siphc
Copy link
Contributor

@siphc siphc commented Jul 24, 2022

@siphc siphc requested review from 1st1 and asvetlov as code owners July 24, 2022 05:40
@ghost
Copy link

ghost commented Jul 24, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Jul 24, 2022
@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Jul 24, 2022

The change is very small no news entry is required, I added skip news.

Comment on lines 51 to 56
* - :class:`TaskGroup`
- Holds a group of tasks.

* - :class:`Runner`
- Manages multiple function calls.

Copy link
Contributor

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.

Copy link
Contributor

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

@siphc
Copy link
Contributor Author

siphc commented Jul 25, 2022

Thanks! Let me know if it fits better now.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Member

@gvanrossum gvanrossum left a 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.

@siphc
Copy link
Contributor Author

siphc commented Sep 2, 2022

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@gvanrossum: please review the changes made to this pull request.

@gvanrossum gvanrossum merged commit 2a9e4e4 into python:main Sep 2, 2022
@gvanrossum gvanrossum added the needs backport to 3.11 only security fixes label Sep 2, 2022
@miss-islington
Copy link
Contributor

Thanks @siphc for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-96511 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 2, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 2, 2022
…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]>
@siphc siphc deleted the fix-issue-95180 branch September 2, 2022 16:41
miss-islington added a commit that referenced this pull request Sep 2, 2022
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-asyncio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants