]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-91636: Clear weakrefs created by finalizers. (GH-136401)
authorNeil Schemenauer <nas-github@arctrix.com>
Tue, 8 Jul 2025 19:19:57 +0000 (12:19 -0700)
committerGitHub <noreply@github.com>
Tue, 8 Jul 2025 19:19:57 +0000 (12:19 -0700)
commitb6b99bf7f1edab77c485faf4e23da868f3a7b68c
treee56ae3c97cd52d64ff375223a7e5f41cc1a25cba
parentbc9bc078df302dd5cc9928c42c37f4f6d414c767
GH-91636: Clear weakrefs created by finalizers. (GH-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.
Lib/test/test_gc.py
Misc/NEWS.d/next/Core_and_Builtins/2025-07-07-17-26-06.gh-issue-91636.GyHU72.rst [new file with mode: 0644]
Python/gc.c
Python/gc_free_threading.c