SIGN IN SIGN UP

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

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 b6b99bf7f1edab77c485faf4e23da868f3a7b68c)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
S
Sergey Miryanov committed
eda53e6cf1c518704d870dd77c35f0cca9c71c52
Parent: 43fe06b
Committed by GitHub <noreply@github.com> on 3/23/2026, 11:50:41 PM