Skip to content

GH-90908: Document asyncio.TaskGroup #94359

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
Jun 30, 2022
Merged

Conversation

gvanrossum
Copy link
Member

@gvanrossum gvanrossum commented Jun 28, 2022

@gvanrossum gvanrossum added docs Documentation in the Doc dir needs backport to 3.11 only security fixes labels Jun 28, 2022
@gvanrossum gvanrossum requested review from 1st1 and asvetlov as code owners June 28, 2022 00:01
@kumaraditya303
Copy link
Contributor

It would be nice to mention this in 3.11 Whatsnews under improved modules.

@gvanrossum gvanrossum marked this pull request as draft June 28, 2022 03:24
@gvanrossum gvanrossum mentioned this pull request Jun 28, 2022
Copy link
Member Author

@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.

I still have to add a section explaining how the waiting actually happens, using cancellations, and the various cases.

@vstinner
Copy link
Member

That's funny. I was looking for TaskGroup in the doc, and I was surprised that it was not documented at all. When I looked for the PR which added TaskGroup, I found this PR which adds documentation, PR created 16 hours ago :-) Great!

@gvanrossum
Copy link
Member Author

@CAM-Gerlach This is ready for you. I'm also undrafting it.

@gvanrossum gvanrossum marked this pull request as ready for review June 29, 2022 04:46
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to my relatively uneducated eye, with just a handful of minor textual/syntax suggestions. A few of the sections got a bit dense at times, but I was able to get the gist of them (despite being a rank beginner) at least after a re-read or two and without much context, and I'm not sure how to explain them more simply.

One high-level thing to consider: Perhaps consider moving the class definition closer to the top of the section, after the introduction/summary line but before the example? I'm not super solid on this, but it feels somewhat out of place at the end (especially with the example being introduced before it), and as a side effect it means that the link from What's New puts the reader at the end of the relevant section rather than the beginning. But I don't feel too strongly about it.

gvanrossum and others added 3 commits June 30, 2022 08:48
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Also remove a redundant versionchanged directive.
@gvanrossum
Copy link
Member Author

Maybe @ambv can approve this? We can always iterate later.

(Question: when gh-94400 is landed, we should probably mention that behavior too. Should we wait for that and then update this PR, or should we add a doc update to gh-94400?

Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this, Guido. LGTM.

@ambv ambv merged commit b6ec6d4 into python:main Jun 30, 2022
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 30, 2022
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit b6ec6d4)

Co-authored-by: Guido van Rossum <guido@python.org>
@bedevere-bot
Copy link

GH-94456 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 Jun 30, 2022
ambv pushed a commit that referenced this pull request Jun 30, 2022
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit b6ec6d4)

Co-authored-by: Guido van Rossum <guido@python.org>
@gvanrossum
Copy link
Member Author

Thanks for the reviews and merging!

gvanrossum added a commit to gvanrossum/cpython that referenced this pull request Jun 30, 2022
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@gvanrossum gvanrossum deleted the task-group-doc branch August 7, 2022 15:52
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants