summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-07-29 01:23:47 (GMT)
committerGitHub <noreply@github.com>2022-07-29 01:23:47 (GMT)
commit3e7cad3bca64ab213c66e2bd41c9d1cf1d057526 (patch)
treedef84e7995f73122d158470f8f178d38726a981c /Doc/whatsnew
parent6e44bf9558dbcaffd78b7c4fc7f6b474388b4a9a (diff)
downloadcpython-3e7cad3bca64ab213c66e2bd41c9d1cf1d057526.zip
cpython-3e7cad3bca64ab213c66e2bd41c9d1cf1d057526.tar.gz
cpython-3e7cad3bca64ab213c66e2bd41c9d1cf1d057526.tar.bz2
gh-94673: Add Per-Interpreter tp_weaklist for Static Builtin Types (#95302)
* Store tp_weaklist on the interpreter state for static builtin types. * Factor out _PyStaticType_GET_WEAKREFS_LISTPTR(). * Add _PyStaticType_ClearWeakRefs(). * Add a comment about how _PyStaticType_ClearWeakRefs() loops. * Document the change. * Update Doc/whatsnew/3.12.rst * Fix a typo.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.12.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 0302055..0c53bc0 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -413,6 +413,13 @@ Porting to Python 3.12
``Py_UNICODE*`` based format (e.g. ``u``, ``Z``) anymore. Please migrate
to other formats for Unicode like ``s``, ``z``, ``es``, and ``U``.
+* ``tp_weaklist`` for all static builtin types is always ``NULL``.
+ This is an internal-only field on ``PyTypeObject``
+ but we're pointing out the change in case someone happens to be
+ accessing the field directly anyway. To avoid breakage, consider
+ using the existing public C-API instead, or, if necessary, the
+ (internal-only) ``_PyObject_GET_WEAKREFS_LISTPTR()`` macro.
+
Deprecated
----------