Support running PySide on Python 3.12
authorChristian Tismer <tismer@stackless.com>
Tue, 14 Feb 2023 13:46:22 +0000 (14:46 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 14 Apr 2024 20:48:11 +0000 (23:48 +0300)
commit21984abc9a460c58cc6382072aff33382c61148b
tree0c2c0055acce4e36dbd39da7c3a5ccd7e635ce41
parent806ed1c7e2ccc1abc62a20ee9ef4b8e37be50868
Support running PySide on Python 3.12

Builtin types no longer have tp_dict set. We need to
use PyType_GetDict, instead. This works without Limited API
at the moment.

With some great cheating, this works with Limited API, too.
We emulate PyType_GetDict by tp_dict if that is not 0.
Otherwise we create an empty dict.

Some small changes to Exception handling and longer
warm-up in leaking tests were found, too.

Pick-to: 6.6 6.5 6.2
Task-number: PYSIDE-2230
Change-Id: I8a56de6208ec00979255b39b5784dfc9b4b92def
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 441ffbd4fc622e67acd81e9c1c6d3a0b0fbcacf0)

Gbp-Pq: Name Support-running-PySide-on-Python-3.12.patch
13 files changed:
build_scripts/config.py
sources/pyside2/PySide2/support/generate_pyi.py
sources/pyside2/libpyside/feature_select.cpp
sources/pyside2/libpyside/pysideproperty.cpp
sources/pyside2/libpyside/pysidesignal.cpp
sources/pyside2/tests/QtWidgets/bug_662.py
sources/pyside2/tests/signals/bug_79.py
sources/shiboken2/libshiboken/pep384impl.cpp
sources/shiboken2/libshiboken/pep384impl.h
sources/shiboken2/libshiboken/signature/signature.cpp
sources/shiboken2/libshiboken/signature/signature_helper.cpp
sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
sources/shiboken2/tests/samplebinding/enum_test.py