Skip to content

gh-155515: Use GC track for HAMT iterators - #155517

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
nascheme:gh-155515-hamt-iter-gc-track
Aug 13, 2026
Merged

kumaraditya303 merged 1 commit into
python:mainfrom
nascheme:gh-155515-hamt-iter-gc-track

Conversation

@nascheme

@nascheme nascheme commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

Track the internal HAMT iterators, which back iteration over a contextvars.Context. A reference cycle running through such an iterator was never collected, leaking the whole context it iterated over.

Track the internal HAMT iterators, which back iteration over a
contextvars.Context.  A reference cycle running through such an iterator
was never collected, leaking the whole context it iterated over.
@nascheme
nascheme marked this pull request as ready for review August 12, 2026 15:19
@nascheme
nascheme requested a review from 1st1 as a code owner August 12, 2026 15:20
@kumaraditya303 kumaraditya303 added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Aug 13, 2026
@kumaraditya303
kumaraditya303 merged commit f056212 into python:main Aug 13, 2026
66 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Aug 13, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @nascheme and @kumaraditya303, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f0562124927ec0087a5d3460efe08567aab64b84 3.13
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Aug 17, 2026
hugovk pushed a commit that referenced this pull request Aug 17, 2026
…5698)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
hugovk pushed a commit that referenced this pull request Aug 17, 2026
…5918)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
hugovk pushed a commit that referenced this pull request Aug 17, 2026
…5697)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants