Skip to content

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Aug 3, 2022

@gvanrossum
Copy link
Member

We're getting very close to the RC1 release date (this Friday!). I'd like to get this in. @graingert can you bless this as strictly better than what we had before?

@kumaraditya303
Copy link
Contributor Author

We're getting very close to the RC1 release date (this Friday!). I'd like to get this in

I agree, I would like to get this in ASAP.

@graingert
Copy link
Contributor

graingert commented Aug 4, 2022

We're getting very close to the RC1 release date (this Friday!). I'd like to get this in. @graingert can you bless this as strictly better than what we had before?

This now follows the five (six? Cc @ambv) rules of uncancellation so I think therefore it's strictly better. However I can't say for sure. It looks to me like TaskGroup was relying on task.cancelling() >= 1 traveling up the stack to communicate with parent scopes without anticipating that it also travels down the rest of the function body.

@graingert
Copy link
Contributor

graingert commented Aug 4, 2022

In addition I think there's other more fundamental problems with uncancel, for example when a cancellation is delivered from a chained concurrent.fututes.Future or when a TaskGroup task waits on another TaskGroup task and cancellation is chained between them

@gvanrossum gvanrossum merged commit 2fef275 into python:main Aug 4, 2022
@miss-islington
Copy link
Contributor

Thanks @kumaraditya303 for the PR, and @gvanrossum 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 Aug 4, 2022
…quested (pythonGH-95602)

Co-authored-by: Guido van Rossum <[email protected]>
(cherry picked from commit 2fef275)

Co-authored-by: Kumar Aditya <[email protected]>
@bedevere-bot
Copy link

GH-95654 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 Aug 4, 2022
miss-islington added a commit that referenced this pull request Aug 4, 2022
GH-95602)

Co-authored-by: Guido van Rossum <[email protected]>
(cherry picked from commit 2fef275)

Co-authored-by: Kumar Aditya <[email protected]>
@kumaraditya303 kumaraditya303 deleted the fix-taskgroup-uncancel branch August 4, 2022 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-blocker topic-asyncio type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants