Skip to content

Conversation

@picnixz
Copy link
Member

@picnixzpicnixz commented Sep 1, 2025

This type is a true container type and thus needs the GC.

@picnixzpicnixz marked this pull request as draft September 1, 2025 18:55
@picnixzpicnixz marked this pull request as ready for review September 2, 2025 10:24
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

@serhiy-storchaka
Copy link
Member

This fixes possible reference loops via panel.set_userptr(). So, I think it is worth to backport it.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@picnixzpicnixz merged commit 572df47 into python:mainSep 3, 2025
51 checks passed
@miss-islington-app
Copy link

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@picnixzpicnixz deleted the fix/gc/curses-heap-types-116946 branch September 3, 2025 08:17
@miss-islington-app
Copy link

Sorry, @picnixz, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 572df47840d910b9fc9cd951074232ae89442be1 3.14 

@miss-islington-app
Copy link

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

cherry_picker 572df47840d910b9fc9cd951074232ae89442be1 3.13 

picnixz added a commit to picnixz/cpython that referenced this pull request Sep 3, 2025
…l.panel` (pythonGH-138333) This commit fixes possible reference loops via `panel.set_userptr` by implementing `tp_clear` and `tp_traverse` for panel objects. (cherry picked from commit 572df47) Co-authored-by: Bénédikt Tran <[email protected]>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.14 bugs and security fixes label Sep 3, 2025
picnixz added a commit to picnixz/cpython that referenced this pull request Sep 3, 2025
…l.panel` (pythonGH-138333) This commit fixes possible reference loops via `panel.set_userptr` by implementing `tp_clear` and `tp_traverse` for panel objects. (cherry picked from commit 572df47) Co-authored-by: Bénédikt Tran <[email protected]>
@bedevere-app
Copy link

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

@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and security fixes label Sep 3, 2025
picnixz added a commit that referenced this pull request Sep 6, 2025
…l` (GH-138333) (#138428) [3.14] gh-116946: fully implement GC protocol for `_curses_panel.panel` (GH-138333) This commit fixes possible reference loops via `panel.set_userptr` by implementing `tp_clear` and `tp_traverse` for panel objects. (cherry picked from commit 572df47)
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
lkollar pushed a commit to lkollar/cpython that referenced this pull request Sep 9, 2025
python#138333) This commit fixes possible reference loops via `panel.set_userptr` by implementing `tp_clear` and `tp_traverse` for panel objects.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@picnixz@serhiy-storchaka@vstinner@RatStar811