]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-144054: no deferred refcount for untracked (gh-144081)
authorNeil Schemenauer <nas-github@arctrix.com>
Tue, 20 Jan 2026 18:01:09 +0000 (10:01 -0800)
committerGitHub <noreply@github.com>
Tue, 20 Jan 2026 18:01:09 +0000 (10:01 -0800)
commit48b6866047ab7d6001ff253053ee239ad2862277
tree76ec201e8f048f514d7f5aa042b8fa20988131bb
parent43bb6300b3e1b477436592ecbbbebbe1534499cf
gh-144054: no deferred refcount for untracked (gh-144081)

This reverts gh-144055 and fixes the bug in a different way.  Deferred
reference counting relies on the object being tracked by the GC,
otherwise the object will live until interpreter shutdown.  So, take
care that we do not enable deferred reference counting for objects that
are untracked.  Also, if a tuple has deferred reference counting
enabled, don't untrack it.
Python/gc_free_threading.c
Python/specialize.c