Skip to content

gh-155143: Fix asyncio.shield leaking tasks via await-graph. - #155144

Merged
kumaraditya303 merged 3 commits into
python:mainfrom
pteromys:main
Aug 15, 2026
Merged

gh-155143: Fix asyncio.shield leaking tasks via await-graph.#155144
kumaraditya303 merged 3 commits into
python:mainfrom
pteromys:main

Conversation

@pteromys

@pteromys pteromys commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

There were two places where `cur_task` could live until `inner` ended:

1. `inner._asyncio_awaited_by`, and
2. as a capture in `_clear_awaited_by_callback` in `inner._callbacks`.
Comment thread Lib/test/test_asyncio/test_tasks.py Outdated
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Comment thread Lib/test/test_asyncio/test_tasks.py Outdated
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) August 14, 2026 15:34
@kumaraditya303
kumaraditya303 merged commit fbd2e01 into python:main Aug 15, 2026
97 of 99 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants