]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin...
authorEric Snow <ericsnowcurrently@gmail.com>
Wed, 31 May 2023 00:13:35 +0000 (18:13 -0600)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 00:13:35 +0000 (00:13 +0000)
commit7be667dfafa2465df6342d72dca9c1f82dd830d0
tree6fb8852fb71d0348327d0d79bf152acb4fddd03d
parent26e7bbf66e93ee7c94b6e007ec7b2d769c2ced92
gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static Builtin Types (gh-105115)

In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry.  However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses).  We address that here by reverting back to shared objects, making them immortal in the process.
Include/internal/pycore_object.h
Include/internal/pycore_typeobject.h
Lib/test/test_capi/test_misc.py
Misc/NEWS.d/next/C API/2023-05-30-17-45-32.gh-issue-105115.iRho1K.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Objects/typeobject.c