GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-90908: Document asyncio.TaskGroup by gvanrossum · Pull Request #94359 · python/cpython

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Jun 28, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

(Does this need a blurb?)

  • Issue: Introduce task groups to asyncio and change task cancellation semantics #90908

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
@bedevere-bot bedevere-bot added the awaiting core review label Jun 28, 2022
@gvanrossum
pythonGH-90908: Document TaskGroup
4747a9a
@gvanrossum
gvanrossum force-pushed the task-group-doc branch from 7fbc914 to 4747a9a Compare June 28, 2022 00:06
@kumaraditya303 kumaraditya303 added the skip news label Jun 28, 2022
@kumaraditya303

kumaraditya303 commented Jun 28, 2022

Copy link
Copy Markdown
Contributor

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

cj81499 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum
Link to example
293c46b
@gvanrossum
gvanrossum marked this pull request as draft June 28, 2022 03:24
@gvanrossum gvanrossum mentioned this pull request Jun 28, 2022
Asyncio Tutorial #79012
Closed
@gvanrossum
Mention task groups in what's new 3.11
8f5f5ec
ambv
ambv reviewed Jun 28, 2022
View reviewed changes
Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum
gvanrossum commented Jun 28, 2022
View reviewed changes

@gvanrossum gvanrossum left a comment

Copy link
Copy Markdown
Member Author

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 still have to add a section explaining how the waiting actually happens, using cancellations, and the various cases.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jun 28, 2022

Copy link
Copy Markdown
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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum added 2 commits June 28, 2022 17:58
@gvanrossum
Describe what happens when tasks fail
57bef41
@gvanrossum
Merge branch 'main' into task-group-doc
33b1fc0
@gvanrossum

gvanrossum commented Jun 29, 2022

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gvanrossum
gvanrossum marked this pull request as ready for review June 29, 2022 04:46
@gvanrossum gvanrossum mentioned this pull request Jun 29, 2022
Implement asyncio.timeout() context manager #90927
Closed
CAM-Gerlach
CAM-Gerlach reviewed Jun 30, 2022
View reviewed changes

@CAM-Gerlach CAM-Gerlach left a comment

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/library/asyncio-task.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Doc/whatsnew/3.11.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum and others added 3 commits June 30, 2022 08:48
@gvanrossum @CAM-Gerlach
CAM's code review
240bf48
Co-authored-by: CAM Gerlach <[email protected]>
@gvanrossum
Add a note recommending TaskGroup to gather
1ec56fb
Also remove a redundant versionchanged directive.
@gvanrossum
Move 'class TaskGroup' up in its section
8126057
@gvanrossum

gvanrossum commented Jun 30, 2022

Copy link
Copy Markdown
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?

ambv reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1st1
1st1 approved these changes Jun 30, 2022
View reviewed changes

@1st1 1st1 left a comment

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jun 30, 2022
@ambv
ambv merged commit b6ec6d4 into python:main Jun 30, 2022
@miss-islington

miss-islington commented Jun 30, 2022

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Jun 30, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 30, 2022
@gvanrossum @miss-islington
pythonGH-90908: Document asyncio.TaskGroup (pythonGH-94359)
72ed089
Co-authored-by: CAM Gerlach <[email protected]>
(cherry picked from commit b6ec6d4)

Co-authored-by: Guido van Rossum <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 30, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@miss-islington @gvanrossum
GH-90908: Document asyncio.TaskGroup (GH-94359) (GH-94456)
b3d69ff
Co-authored-by: CAM Gerlach <[email protected]>
(cherry picked from commit b6ec6d4)

Co-authored-by: Guido van Rossum <[email protected]>
@gvanrossum

gvanrossum commented Jun 30, 2022

Copy link
Copy Markdown
Member Author

Thanks for the reviews and merging!

CAM-Gerlach and vstinner reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gvanrossum added a commit to gvanrossum/cpython that referenced this pull request Jun 30, 2022
@gvanrossum @CAM-Gerlach
pythonGH-90908: Document asyncio.TaskGroup (pythonGH-94359)
159a057
Co-authored-by: CAM Gerlach <[email protected]>
@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

Reviewers

@ambv ambv ambv left review comments
@CAM-Gerlach CAM-Gerlach CAM-Gerlach left review comments
@1st1 1st1 1st1 approved these changes
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@gvanrossum @kumaraditya303 @vstinner @miss-islington @bedevere-bot @ambv @1st1 @CAM-Gerlach
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.