-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix TimerContext not uncancelling the current task #9326
Conversation
effectively the same fix as aio-libs/async-timeout#363
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #9326 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 107 107
Lines 34896 34939 +43
Branches 4135 4145 +10
=======================================
+ Hits 34395 34438 +43
Misses 334 334
Partials 167 167
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This is probably causing a lot of unexplained behavior. I guess we should do another release. |
We don't handle subclassed CancelledError but cpython does via python/cpython#113848 I'm not sure that can ever happen for us though |
We also could swallow cancellation so we needed a similar change to python/cpython#102815 |
Backport to 3.10: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply fe26ae2 on top of patchback/backports/3.10/fe26ae2cad87b412c0372db0aaf2f3651d5d1319/pr-9326 Backporting merged PR #9326 into master
🤖 @patchback |
Backport to 3.11: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply fe26ae2 on top of patchback/backports/3.11/fe26ae2cad87b412c0372db0aaf2f3651d5d1319/pr-9326 Backporting merged PR #9326 into master
🤖 @patchback |
(cherry picked from commit fe26ae2)
(cherry picked from commit fe26ae2)
Since python/cpython#117407 is going out in cpython 3.13 on Tuesday according to PEP 0179 it seems like we need to do another release before Tuesday |
What do these changes do?
Fix TimerContext not uncancelling the current task
This is effectively the same fix as aio-libs/async-timeout#363 to fix cancellation leaking upwards on timeout
This is a long standing issue which will be much more obvious in 3.13 after python/cpython#117407 combined with aiohappyeyeballs 2.4.2, however it likely results in some unexplained cancellation behavior with 3.11/3.12 as well.
fixes #9325
Are there changes in behavior for the user?
cancellation will not leak upward on timeout
Is it a substantial burden for the maintainers to support this?
no