void-packages/srcpkgs/python3-sip-PyQt5/patches/01.python3.12.patch

23 lines
765 B
Diff

https://src.fedoraproject.org/rpms/python-pyqt5-sip/raw/5db48dad9dc59835593ff2bfaf06dca2b8a291b6/f/fix-py3.12-subclass-crash.patch
# HG changeset patch
# User Phil Thompson <phil@riverbankcomputing.com>
# Date 1686926134 -3600
# Node ID d36867e54192b02ebe5743b48774abf75bd9bb57
# Parent 312476401030130daed2eecfd1c93413f49e4458
For Python v3.12 implement sipPyTypeDict() using PyType_GetDict().
diff -r 312476401030 -r d36867e54192 sipbuild/siplib.c
--- a/siplib.c Fri Jun 16 15:19:41 2023 +0100
+++ b/siplib.c Fri Jun 16 15:35:34 2023 +0100
@@ -12597,7 +12597,11 @@
*/
static PyObject *sip_api_py_type_dict(const PyTypeObject *py_type)
{
+#if PY_VERSION_HEX >= 0x030c0000
+ return PyType_GetDict(py_type);
+#else
return py_type->tp_dict;
+#endif
}