Uh oh!
There was an error while loading. Please reload this page.
gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures - #152585
Conversation
…ng-lived futures asyncio.wait registered the waiting task in each future's awaited_by set but only discarded it from completed futures, pinning the task on futures that never resolve. Discard from all futures on return.
Uh oh!
There was an error while loading. Please reload this page.
Thanks @Skn0tt for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks @Skn0tt for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Thanks @Skn0tt for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
GH-152866 is a backport of this pull request to the 3.14 branch. |
GH-152867 is a backport of this pull request to the 3.13 branch. |
GH-152868 is a backport of this pull request to the 3.15 branch. |
Skn0tt
commented
Jul 2, 2026
Thanks for the quick review! |
asyncio.wait registered the waiting task in each future's awaited_by set but only discarded it from completed futures, pinning the task on futures that never resolve. Discard from all futures on return.
Similar to fccbfc4.
future_discard_from_awaited_by) #152569