Skip to content

gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures#152585

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
Skn0tt:gh-152569-wait-awaited-by-leak
Jul 2, 2026
Merged

gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures#152585
kumaraditya303 merged 1 commit into
python:mainfrom
Skn0tt:gh-152569-wait-awaited-by-leak

Conversation

@Skn0tt

@Skn0tt Skn0tt commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

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.

…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.
@python-cla-bot

python-cla-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@kumaraditya303 kumaraditya303 merged commit f8514dc into python:main Jul 2, 2026
57 checks passed
@kumaraditya303 kumaraditya303 added topic-asyncio needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 2, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @Skn0tt for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

Thanks @Skn0tt for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

GH-152866 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 2, 2026
@bedevere-app

bedevere-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

GH-152867 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 2, 2026
@bedevere-app

bedevere-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

GH-152868 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 2, 2026
@Skn0tt

Skn0tt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review!

kumaraditya303 pushed a commit that referenced this pull request Jul 2, 2026
…ong-lived futures (GH-152585) (#152866)

gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585)
(cherry picked from commit f8514dc)

Co-authored-by: Simon Knott <info@simonknott.de>
kumaraditya303 pushed a commit that referenced this pull request Jul 2, 2026
…ong-lived futures (GH-152585) (#152868)

gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585)
(cherry picked from commit f8514dc)

Co-authored-by: Simon Knott <info@simonknott.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants