summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-08-17 11:50:53 (GMT)
committerGitHub <noreply@github.com>2022-08-17 11:50:53 (GMT)
commitb73e3b6d4a6c505f2869ae4d0a4a93241450cf32 (patch)
tree4225e01b62828975bd57361b2d1137bae9aa754e /Misc
parent0f2b469ce1a6f123ad9e151b1771651b3e1d2de6 (diff)
downloadcpython-b73e3b6d4a6c505f2869ae4d0a4a93241450cf32.zip
cpython-b73e3b6d4a6c505f2869ae4d0a4a93241450cf32.tar.gz
cpython-b73e3b6d4a6c505f2869ae4d0a4a93241450cf32.tar.bz2
GH-95589: Dont crash when subclassing extension classes with multiple inheritance (GH-96028)
* Treat tp_weakref and tp_dictoffset like other opaque slots for multiple inheritance. * Document Py_TPFLAGS_MANAGED_DICT and Py_TPFLAGS_MANAGED_WEAKREF in what's new.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2022-08-16-16-54-42.gh-issue-95589.6xE1ar.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2022-08-16-16-54-42.gh-issue-95589.6xE1ar.rst b/Misc/NEWS.d/next/C API/2022-08-16-16-54-42.gh-issue-95589.6xE1ar.rst
new file mode 100644
index 0000000..696e3c8
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2022-08-16-16-54-42.gh-issue-95589.6xE1ar.rst
@@ -0,0 +1,4 @@
+Extensions classes that set ``tp_dictoffset`` and ``tp_weaklistoffset``
+lose the support for multiple inheritance, but are now safe. Extension
+classes should use :const:`Py_TPFLAGS_MANAGED_DICT` and
+:const:`Py_TPFLAGS_MANAGED_WEAKREF` instead.