1 From: Christian Tismer <tismer@stackless.com>
2 Date: Tue, 14 Feb 2023 14:46:22 +0100
3 Subject: Python 3.12: Fix the structure of class property
5 There is a PySide bug in Python 3.10 already: The structure for
6 classproperty derives from the property structure. This was extended
7 in Python 3.10, already, but the type generation check was made more
8 exhaustive in Python 3.12 and recognized that.
10 This change is only for making the compiler/C API happy.
11 In order to use the extension field, it is necessary to do a runtime
12 check because of the Limited API.
14 Task-number: PYSIDE-2230
15 Change-Id: I88dcaa11589ff41852f08fa2defa5200a0dd4eb6
16 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
17 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
18 (cherry picked from commit edfd9a5ad174a48f8d7da511dc6a1c69e931a418)
20 sources/pyside2/libpyside/feature_select.cpp | 5 +++++
21 1 file changed, 5 insertions(+)
23 diff --git a/sources/pyside2/libpyside/feature_select.cpp b/sources/pyside2/libpyside/feature_select.cpp
24 index 3011b35..b9e1470 100644
25 --- a/sources/pyside2/libpyside/feature_select.cpp
26 +++ b/sources/pyside2/libpyside/feature_select.cpp
27 @@ -671,6 +671,11 @@ typedef struct {
31 +#if PY_VERSION_HEX >= 0x030A0000
32 + // Note: This is a problem with Limited API: We have no direct access.
33 + // You need to pick it from runtime info.
34 + PyObject *prop_name;