]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-151722: Do not track the frozendict in the GC in _PyDict_FromKeys() (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 25 Jun 2026 18:48:52 +0000 (20:48 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2026 18:48:52 +0000 (20:48 +0200)
commit30f9c8a3ef503271947a6a1e2066fd95a194c9b5
tree8bd07ee15ca5ccc00ca3957b4e3e4e6b5eef3ebe
parent59e54f5ce9039f09da03f021d1d7574a84f2834f
[3.15] gh-151722: Do not track the frozendict in the GC in _PyDict_FromKeys() (GH-152067) (#152225)

gh-151722: Do not track the frozendict in the GC in _PyDict_FromKeys() (GH-152067)

_PyDict_FromKeys() now creates a frozendict copy which is
not tracked by the GC.

dict_merge() no longer requires the dictionary to be tracked by the
GC.
(cherry picked from commit 55bc3126e0a09a8e940da73e51ab1ffeecaf02d4)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Doc/library/stdtypes.rst
Lib/test/test_dict.py
Misc/NEWS.d/next/Core_and_Builtins/2026-06-24-13-36-31.gh-issue-151722.lWKfE1.rst [new file with mode: 0644]
Objects/dictobject.c