Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.13] GH-91636: Clear weakrefs created by finalizers. (GH-136401)#144214

Merged
ambv merged 4 commits into
python:3.13python/cpython:3.13from
sergey-miryanov:backport-b6b99bf-3.13sergey-miryanov/cpython:backport-b6b99bf-3.13Copy head branch name to clipboard
Mar 23, 2026
Merged

[3.13] GH-91636: Clear weakrefs created by finalizers. (GH-136401)#144214
ambv merged 4 commits into
python:3.13python/cpython:3.13from
sergey-miryanov:backport-b6b99bf-3.13sergey-miryanov/cpython:backport-b6b99bf-3.13Copy head branch name to clipboard

Conversation

@sergey-miryanov

@sergey-miryanov sergey-miryanov commented Jan 24, 2026

Copy link
Copy Markdown
Contributor

Weakrefs to unreachable garbage that are created during running of finalizers need to be cleared. This avoids exposing objects that have tp_clear called on them to Python-level code. (cherry picked from commit b6b99bf)

…H-136401)

Weakrefs to unreachable garbage that are created during running of
finalizers need to be cleared.  This avoids exposing objects that
have `tp_clear` called on them to Python-level code.
(cherry picked from commit b6b99bf)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
@gpshead

gpshead commented Jan 25, 2026

Copy link
Copy Markdown
Member

I think this needs re-applying to 3.14 if we're going to do it for 3.13. it was removed (likely temporarily) from 3.14 as a risk mitigation for 3.14.1 (see issue and prs)

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

I understand. At least we have "working" PR for backporting if we decide so :)

@vstinner

Copy link
Copy Markdown
Member

I think this needs re-applying to 3.14 if we're going to do it for 3.13. it was removed (likely temporarily) from 3.14 as a risk mitigation for 3.14.1 (see issue and prs)

What's the status of this change? Did it land in 3.14 again or not?

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

@hugovk @Yhg1s Should we merge this since 3.14 backport was merged?

@vstinner

Copy link
Copy Markdown
Member

The 3.14 change is #144444?

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

@vstinner Yes.

@ambv ambv merged commit eda53e6 into python:3.13 Mar 23, 2026
42 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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.