-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
TaskGroup fails to cancel tasks pending creation, if that task starts a failing task #128550
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
Comments
This is happening because as per the following code, we skip scheduling the done callback to the event loop incase the task completes eagerly, I would lean towards fixing this by removing this case and always add the done callback which would be simpler and fix this. cpython/Lib/asyncio/taskgroups.py Lines 200 to 207 in a30277a
|
@kumaraditya303 do we want this removed on 3.14, 3.13 and 3.12? or just 3.12? |
Yes, all the branches. |
ok will get that setup, |
…t missed and introduced incorrect cancellations
…t missed and introduced incorrect cancellations
ok working on news now, looks like it will fix #128588 also |
…t missed and introduced incorrect cancellations (pythonGH-129063) (cherry picked from commit ed6934e) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
…sed and introduced incorrect cancellations (GH-129063) (#129089) gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations (GH-129063) (cherry picked from commit ed6934e) Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
…t missed and introduced incorrect cancellations (python#129063) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
…t missed and introduced incorrect cancellations (python#129063) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Bug report
Bug description:
this 'deadlocks' on eager tasks, but raises an EG as expected on regular 'lazy' tasks.
CPython versions tested on:
3.12, 3.13, 3.14
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: