summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-02 17:24:08 (GMT)
committerGitHub <noreply@github.com>2023-10-02 17:24:08 (GMT)
commitfc2cb86d210555d509debaeefd370d5331cd9d93 (patch)
treeebbe2b02c0ff0b0c0cab825b52d79ccf3e99fb18 /Doc/whatsnew
parent6387b5313c60c1403785b2245db33372476ac304 (diff)
downloadcpython-fc2cb86d210555d509debaeefd370d5331cd9d93.zip
cpython-fc2cb86d210555d509debaeefd370d5331cd9d93.tar.gz
cpython-fc2cb86d210555d509debaeefd370d5331cd9d93.tar.bz2
gh-107073: Make PyObject_VisitManagedDict() public (#108763)
Make PyObject_VisitManagedDict() and PyObject_ClearManagedDict() functions public in Python 3.13 C API. * Rename _PyObject_VisitManagedDict() to PyObject_VisitManagedDict(). * Rename _PyObject_ClearManagedDict() to PyObject_ClearManagedDict(). * Document these functions.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.12.rst2
-rw-r--r--Doc/whatsnew/3.13.rst6
2 files changed, 7 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 3a2adc4..6fe00bb 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -2123,7 +2123,7 @@ Porting to Python 3.12
The use of ``tp_dictoffset`` and ``tp_weaklistoffset`` is still
supported, but does not fully support multiple inheritance
(:gh:`95589`), and performance may be worse.
- Classes declaring :c:macro:`Py_TPFLAGS_MANAGED_DICT` should call
+ Classes declaring :c:macro:`Py_TPFLAGS_MANAGED_DICT` must call
:c:func:`!_PyObject_VisitManagedDict` and :c:func:`!_PyObject_ClearManagedDict`
to traverse and clear their instance's dictionaries.
To clear weakrefs, call :c:func:`PyObject_ClearWeakRefs`, as before.
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index 3a1b283..1ef04fa 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -995,6 +995,12 @@ New Features
references) now supports the :ref:`Limited API <limited-c-api>`.
(Contributed by Victor Stinner in :gh:`108634`.)
+* Add :c:func:`PyObject_VisitManagedDict` and
+ :c:func:`PyObject_ClearManagedDict` functions which must be called by the
+ traverse and clear functions of a type using
+ :c:macro:`Py_TPFLAGS_MANAGED_DICT` flag.
+ (Contributed by Victor Stinner in :gh:`107073`.)
+
Porting to Python 3.13
----------------------