[neon/qt/pyside2/Neon/unstable] debian: Backport several upstream patches to support Python 3.11.

Dmitry Shachnev null at kde.org
Thu Jun 15 10:12:13 BST 2023


Git commit e96c5807ad796c3657c7903097e94391b483ff60 by Dmitry Shachnev.
Committed on 04/01/2023 at 19:30.
Pushed by carlosdem into branch 'Neon/unstable'.

Backport several upstream patches to support Python 3.11.

M  +1    -0    debian/changelog
A  +36   -0    debian/patches/Fix-Property-GC-tracking-for-Python-3.11.patch
A  +94   -0    debian/patches/Fix-usage-of-Py_TYPE-for-Python-3.11.patch
A  +90   -0    debian/patches/PyEnum-make-forgiving-duplicates-work-with-Python-3.11.patch
A  +44   -0    debian/patches/Shiboken-Fix-the-oldest-shiboken-bug-ever.patch
A  +35   -0    debian/patches/libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
A  +62   -0    debian/patches/libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
A  +29   -0    debian/patches/make-wheels-compatible-with-Python-3.11.patch
M  +7    -0    debian/patches/series

https://invent.kde.org/neon/qt/pyside2/-/commit/e96c5807ad796c3657c7903097e94391b483ff60

diff --git a/debian/changelog b/debian/changelog
index 751eba07..9fadd015 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ pyside2 (5.15.8-1) UNRELEASED; urgency=medium
     - py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
     - shiboken6-Adapt-to-LLVM-12.01.patch
   * Refresh debian/patches/blacklist-failing-tests.patch.
+  * Backport several upstream patches to support Python 3.11.
 
  -- Dmitry Shachnev <mitya57 at debian.org>  Sat, 31 Dec 2022 21:24:57 +0300
 
diff --git a/debian/patches/Fix-Property-GC-tracking-for-Python-3.11.patch b/debian/patches/Fix-Property-GC-tracking-for-Python-3.11.patch
new file mode 100644
index 00000000..4bbd90b8
--- /dev/null
+++ b/debian/patches/Fix-Property-GC-tracking-for-Python-3.11.patch
@@ -0,0 +1,36 @@
+From: Christian Tismer <tismer at stackless.com>
+Date: Sun, 11 Sep 2022 11:19:20 +0200
+Subject: Fix Property GC tracking for Python 3.11
+
+The GC was not untracked when PySide Property was deleted.
+This was found by the new deeper error tracking in debug Python 3.11 .
+
+Fixes: PYSIDE-1960
+Change-Id: I5ecdfb88529c22a44575ca9460d6753b1e389079
+Pick-to: 6.2 6.3 5.15
+Reviewed-by: Friedemann Kleint <Friedemann.Kleint at qt.io>
+(cherry picked from commit ace680f4c5fc8564df9daaa41bf8779c9fffa671)
+---
+ sources/pyside2/libpyside/pysideproperty.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
+index 3b4039a..5739c28 100644
+--- a/sources/pyside2/libpyside/pysideproperty.cpp
++++ b/sources/pyside2/libpyside/pysideproperty.cpp
+@@ -104,6 +104,7 @@ static PyType_Slot PySidePropertyType_slots[] = {
+     {Py_tp_init, (void *)qpropertyTpInit},
+     {Py_tp_new, (void *)qpropertyTpNew},
+     {Py_tp_getset, PySidePropertyType_getset},
++    {Py_tp_del, reinterpret_cast<void *>(PyObject_GC_Del)},
+     {0, 0}
+ };
+ // Dotted modulename is crucial for SbkType_FromSpec to work. Is this name right?
+@@ -249,6 +250,7 @@ static void qpropertyDeAlloc(PyObject *self)
+         // This was not needed before Python 3.8 (Python issue 35810)
+         Py_DECREF(Py_TYPE(self));
+     }
++    PyObject_GC_UnTrack(self);
+     Py_TYPE(self)->tp_free(self);
+ }
+ 
diff --git a/debian/patches/Fix-usage-of-Py_TYPE-for-Python-3.11.patch b/debian/patches/Fix-usage-of-Py_TYPE-for-Python-3.11.patch
new file mode 100644
index 00000000..3e7f386e
--- /dev/null
+++ b/debian/patches/Fix-usage-of-Py_TYPE-for-Python-3.11.patch
@@ -0,0 +1,94 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Thu, 9 Jun 2022 13:45:07 +0200
+Subject: Fix usage of Py_TYPE() for Python 3.11
+
+The macro was changed to a function, no longer allowing for assignment.
+
+Pick-to: 6.3 6.2 5.15
+Task-number: PYSIDE-1960
+Change-Id: I4bc0e9a5c1f3dc70d59628e63b7b9d47ea449992
+Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes at qt.io>
+Reviewed-by: Christian Tismer <tismer at stackless.com>
+(cherry picked from commit 73adefe22ffbfabe0ef213e9c2fe2c56efdd7488)
+---
+ sources/pyside2/libpyside/pysideqflags.cpp    | 2 +-
+ sources/pyside2/libpyside/pysidesignal.cpp    | 2 +-
+ sources/pyside2/libpyside/pysideweakref.cpp   | 2 +-
+ sources/shiboken2/libshiboken/basewrapper.cpp | 4 ++--
+ sources/shiboken2/libshiboken/sbkenum.cpp     | 2 +-
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/sources/pyside2/libpyside/pysideqflags.cpp b/sources/pyside2/libpyside/pysideqflags.cpp
+index 8b224f2..784082a 100644
+--- a/sources/pyside2/libpyside/pysideqflags.cpp
++++ b/sources/pyside2/libpyside/pysideqflags.cpp
+@@ -192,7 +192,7 @@ namespace QFlags
+         }
+         newspec.slots = SbkNewQFlagsType_spec.slots;
+         PyTypeObject *type = (PyTypeObject *)SbkType_FromSpec(&newspec);
+-        Py_TYPE(type) = &PyType_Type;
++        Py_SET_TYPE(type, &PyType_Type);
+ 
+         PySideQFlagsType *flagsType = reinterpret_cast<PySideQFlagsType *>(type);
+         PepType_PFTP(flagsType)->converterPtr = &PepType_PFTP(flagsType)->converter;
+diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
+index b5069a0..ce89a9d 100644
+--- a/sources/pyside2/libpyside/pysidesignal.cpp
++++ b/sources/pyside2/libpyside/pysidesignal.cpp
+@@ -162,7 +162,7 @@ PyTypeObject *PySideSignalTypeF(void)
+     if (!type) {
+         type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&PySideSignalType_spec));
+         PyTypeObject *hold = Py_TYPE(type);
+-        Py_TYPE(type) = PySideMetaSignalTypeF();
++        Py_SET_TYPE(type, PySideMetaSignalTypeF());
+         Py_INCREF(Py_TYPE(type));
+         Py_DECREF(hold);
+     }
+diff --git a/sources/pyside2/libpyside/pysideweakref.cpp b/sources/pyside2/libpyside/pysideweakref.cpp
+index cd90634..730990f 100644
+--- a/sources/pyside2/libpyside/pysideweakref.cpp
++++ b/sources/pyside2/libpyside/pysideweakref.cpp
+@@ -90,7 +90,7 @@ PyObject *create(PyObject *obj, PySideWeakRefFunction func, void *userData)
+ 
+     if (Py_TYPE(PySideCallableObjectTypeF()) == 0)
+     {
+-        Py_TYPE(PySideCallableObjectTypeF()) = &PyType_Type;
++        Py_SET_TYPE(PySideCallableObjectTypeF(), &PyType_Type);
+         PyType_Ready(PySideCallableObjectTypeF());
+     }
+ 
+diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
+index 917b743..e2eccd0 100644
+--- a/sources/shiboken2/libshiboken/basewrapper.cpp
++++ b/sources/shiboken2/libshiboken/basewrapper.cpp
+@@ -377,7 +377,7 @@ SbkObjectType *SbkObject_TypeF(void)
+     static PyTypeObject *type = nullptr;
+     if (!type) {
+         type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec));
+-        Py_TYPE(type) = SbkObjectType_TypeF();
++        Py_SET_TYPE(type, SbkObjectType_TypeF());
+         Py_INCREF(Py_TYPE(type));
+         type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
+         type->tp_dictoffset = offsetof(SbkObject, ob_dict);
+@@ -1160,7 +1160,7 @@ introduceWrapperType(PyObject *enclosingObject,
+     typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF());
+ 
+     PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
+-    Py_TYPE(heaptype) = SbkObjectType_TypeF();
++    Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
+     Py_INCREF(Py_TYPE(heaptype));
+     auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
+ #if PY_VERSION_HEX < 0x03000000
+diff --git a/sources/shiboken2/libshiboken/sbkenum.cpp b/sources/shiboken2/libshiboken/sbkenum.cpp
+index 7dc73df..9459e42 100644
+--- a/sources/shiboken2/libshiboken/sbkenum.cpp
++++ b/sources/shiboken2/libshiboken/sbkenum.cpp
+@@ -754,7 +754,7 @@ newTypeWithName(const char *name,
+     PyTuple_SetItem(bases, 0, reinterpret_cast<PyObject *>(basetype));
+     auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpecWithBases(&newspec, bases));
+     PyErr_Print();
+-    Py_TYPE(type) = SbkEnumType_TypeF();
++    Py_SET_TYPE(type, SbkEnumType_TypeF());
+ 
+     auto *enumType = reinterpret_cast<SbkEnumType *>(type);
+     PepType_SETP(enumType)->cppName = cppName;
diff --git a/debian/patches/PyEnum-make-forgiving-duplicates-work-with-Python-3.11.patch b/debian/patches/PyEnum-make-forgiving-duplicates-work-with-Python-3.11.patch
new file mode 100644
index 00000000..34aefe03
--- /dev/null
+++ b/debian/patches/PyEnum-make-forgiving-duplicates-work-with-Python-3.11.patch
@@ -0,0 +1,90 @@
+From: Christian Tismer <tismer at stackless.com>
+Date: Tue, 21 Jun 2022 10:22:04 +0200
+Subject: PyEnum: make forgiving duplicates work with Python 3.11
+
+There was a silent change in PyEnums that turns Enum attributes
+into properties. This does not harm the Python interface but
+needed some change in the duplication emulation.
+
+Furthermore, new internal enums are created with an underscore name.
+
+The meta class was changed from EnumMeta to EnumType.
+
+[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
+
+Change-Id: I3b1ab63dc5eed15a75ebd0f42dddf4001f640c00
+Pick-to: 6.3
+Task-number: PYSIDE-1735
+Fixes: PYSIDE-1960
+Reviewed-by: Qt CI Bot <qt_ci_bot at qt-project.org>
+Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes at qt.io>
+(cherry picked from commit da2cf031521815a9559ca784beadb70c7a2852d9)
+---
+ build_scripts/config.py                                             | 1 +
+ sources/pyside2/tests/QtCore/qenum_test.py                          | 6 ++++--
+ sources/shiboken2/libshiboken/pep384impl.h                          | 2 +-
+ .../files.dir/shibokensupport/signature/lib/enum_sig.py             | 3 ++-
+ 4 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/build_scripts/config.py b/build_scripts/config.py
+index 00cbd3f..63e52a2 100644
+--- a/build_scripts/config.py
++++ b/build_scripts/config.py
+@@ -94,6 +94,7 @@ class Config(object):
+             'Programming Language :: Python :: 3.8',
+             'Programming Language :: Python :: 3.9',
+             'Programming Language :: Python :: 3.10',
++            'Programming Language :: Python :: 3.11',
+         ]
+ 
+         self.setup_script_dir = None
+diff --git a/sources/pyside2/tests/QtCore/qenum_test.py b/sources/pyside2/tests/QtCore/qenum_test.py
+index f99a893..0981c26 100644
+--- a/sources/pyside2/tests/QtCore/qenum_test.py
++++ b/sources/pyside2/tests/QtCore/qenum_test.py
+@@ -197,14 +197,16 @@ class SomeClass(QObject):
+ 
+ @unittest.skipUnless(HAVE_ENUM, "requires 'enum' module (use 'pip install enum34' for Python 2)")
+ class TestQEnumMacro(unittest.TestCase):
++    meta_name = "EnumType" if sys.version_info[:2] >= (3, 11) else "EnumMeta"
++
+     def testTopLevel(self):
+         self.assertEqual(type(OuterEnum).__module__, "enum")
+-        self.assertEqual(type(OuterEnum).__name__, "EnumMeta")
++        self.assertEqual(type(OuterEnum).__name__, self.meta_name)
+         self.assertEqual(len(OuterEnum.__members__), 2)
+ 
+     def testSomeClass(self):
+         self.assertEqual(type(SomeClass.SomeEnum).__module__, "enum")
+-        self.assertEqual(type(SomeClass.SomeEnum).__name__, "EnumMeta")
++        self.assertEqual(type(SomeClass.SomeEnum).__name__, self.meta_name)
+         self.assertEqual(len(SomeClass.SomeEnum.__members__), 3)
+         with self.assertRaises(TypeError):
+             int(SomeClass.SomeEnum.C) == 6
+diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h
+index eb65596..1ba8205 100644
+--- a/sources/shiboken2/libshiboken/pep384impl.h
++++ b/sources/shiboken2/libshiboken/pep384impl.h
+@@ -332,7 +332,7 @@ LIBSHIBOKEN_API PyObject *PyRun_String(const char *, int, PyObject *, PyObject *
+ // But this is no problem as we check it's validity for every version.
+ 
+ #define PYTHON_BUFFER_VERSION_COMPATIBLE    (PY_VERSION_HEX >= 0x03030000 && \
+-                                             PY_VERSION_HEX <  0x030AFFFF)
++                                             PY_VERSION_HEX <  0x030C0000)
+ #if !PYTHON_BUFFER_VERSION_COMPATIBLE
+ # error Please check the buffer compatibility for this python version!
+ #endif
+diff --git a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+index 088a93a..2f78718 100644
+--- a/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
++++ b/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+@@ -139,7 +139,8 @@ class ExactEnumerator(object):
+                     functions.append((func_name, thing))
+             elif type(type(thing)) is EnumMeta:
+                 # take the real enum name, not what is in the dict
+-                enums.append((thing_name, type(thing).__qualname__, thing))
++                if not thing_name.startswith("_"):
++                    enums.append((thing_name, type(thing).__qualname__, thing))
+         init_signature = getattr(klass, "__signature__", None)
+         enums.sort(key=lambda tup: tup[1 : 3])  # sort by class then enum value
+         self.fmt.have_body = bool(subclasses or functions or enums or init_signature)
diff --git a/debian/patches/Shiboken-Fix-the-oldest-shiboken-bug-ever.patch b/debian/patches/Shiboken-Fix-the-oldest-shiboken-bug-ever.patch
new file mode 100644
index 00000000..90aa9dd6
--- /dev/null
+++ b/debian/patches/Shiboken-Fix-the-oldest-shiboken-bug-ever.patch
@@ -0,0 +1,44 @@
+From: Christian Tismer <tismer at stackless.com>
+Date: Tue, 21 Jun 2022 10:22:04 +0200
+Subject: Shiboken: Fix the oldest shiboken bug ever which shows up on Python
+ 3.11
+
+b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
+
+There was a `PySequence_Check` in the evaluation of some signature
+function parameter processing, which should have been `PyTuple_Check`.
+
+Since the new PyEnums are also sequences, the new optimization in
+Python 3.11 changed the parameter handling in a correct way and
+replaced the argument tuple by a direct single argument of an enum
+type. And that is also a sequence ...
+
+There are probably still dormant issues like this in the codebase
+which gives reason to submit a task that checks all Python interface
+functions for correctness.
+
+Change-Id: I45996a0458c3e60795d2eb802eb98f7dd3678d92
+Pick-to: 6.3
+Task-number: PYSIDE-1735
+Task-number: PYSIDE-1987
+Fixes: PYSIDE-1988
+Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes at qt.io>
+Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh at qt.io>
+(cherry picked from commit 2720e01f21f3771cb755ef183b8160f691bdb575)
+---
+ sources/pyside2/libpyside/pysidesignal.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sources/pyside2/libpyside/pysidesignal.cpp b/sources/pyside2/libpyside/pysidesignal.cpp
+index ce89a9d..71fc0e3 100644
+--- a/sources/pyside2/libpyside/pysidesignal.cpp
++++ b/sources/pyside2/libpyside/pysidesignal.cpp
+@@ -725,7 +725,7 @@ static QByteArray buildSignature(const QByteArray &name, const QByteArray &signa
+ 
+ static QByteArray parseSignature(PyObject *args)
+ {
+-    if (args && (Shiboken::String::check(args) || !PySequence_Check(args)))
++    if (args && (Shiboken::String::check(args) || !PyTuple_Check(args)))
+         return getTypeName(args);
+ 
+     QByteArray signature;
diff --git a/debian/patches/libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch b/debian/patches/libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
new file mode 100644
index 00000000..29f6cd36
--- /dev/null
+++ b/debian/patches/libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
@@ -0,0 +1,35 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Thu, 9 Jun 2022 16:50:41 +0200
+Subject: libshiboken: Fix a crash in Shiboken::Object::isValid() for Python
+ 3.11
+
+The function is passed type objects for class methods, which caused
+it to crash.
+
+The first clause did not catch this, and so it was cast to SbkObject
+below.
+
+Add a type check to prevent this.
+
+Pick-to: 6.3 6.2 5.15
+Task-number: PYSIDE-1960
+Change-Id: Icfdd6fefb7156ac5961444bd5395109849a1d66e
+Reviewed-by: Christian Tismer <tismer at stackless.com>
+Reviewed-by: Qt CI Bot <qt_ci_bot at qt-project.org>
+(cherry picked from commit 52df3b8f64d08f412d7f8b12d82fc0ae6f3c741d)
+---
+ sources/shiboken2/libshiboken/basewrapper.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
+index 7ac7fad..917b743 100644
+--- a/sources/shiboken2/libshiboken/basewrapper.cpp
++++ b/sources/shiboken2/libshiboken/basewrapper.cpp
+@@ -1525,6 +1525,7 @@ bool setCppPointer(SbkObject *sbkObj, PyTypeObject *desiredType, void *cptr)
+ bool isValid(PyObject *pyObj)
+ {
+     if (!pyObj || pyObj == Py_None
++        || PyType_Check(pyObj) != 0
+         || Py_TYPE(Py_TYPE(pyObj)) != SbkObjectType_TypeF()) {
+         return true;
+     }
diff --git a/debian/patches/libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch b/debian/patches/libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
new file mode 100644
index 00000000..821035b9
--- /dev/null
+++ b/debian/patches/libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
@@ -0,0 +1,62 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Fri, 24 Jun 2022 09:22:01 +0200
+Subject: libshiboken: Fix crashes with static strings in Python 3.11
+
+In Python 3.11, some strings come with a refcount above decimal
+1000000000, apparently indicating that they are interned. Replace the
+mechanism by PyUnicode_InternFromString().
+
+Task-number: PYSIDE-1960
+Pick-to: 6.3 6.2 5.15
+Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168
+Reviewed-by: Qt CI Bot <qt_ci_bot at qt-project.org>
+Reviewed-by: Christian Tismer <tismer at stackless.com>
+(cherry picked from commit a09a1db8391243e6bb290ee66bb6e3afbb114c61)
+---
+ sources/shiboken2/libshiboken/sbkstring.cpp | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/sources/shiboken2/libshiboken/sbkstring.cpp b/sources/shiboken2/libshiboken/sbkstring.cpp
+index 077fb53..a9d451c 100644
+--- a/sources/shiboken2/libshiboken/sbkstring.cpp
++++ b/sources/shiboken2/libshiboken/sbkstring.cpp
+@@ -41,8 +41,14 @@
+ #include "sbkstaticstrings_p.h"
+ #include "autodecref.h"
+ 
+-#include <vector>
+-#include <unordered_set>
++#if PY_VERSION_HEX >= 0x030B0000 || defined(Py_LIMITED_API)
++#  define USE_INTERN_STRINGS
++#endif
++
++#ifndef USE_INTERN_STRINGS
++#  include <vector>
++#  include <unordered_set>
++#endif
+ 
+ namespace Shiboken
+ {
+@@ -233,6 +239,13 @@ Py_ssize_t len(PyObject *str)
+ //     PyObject *attr = PyObject_GetAttr(obj, name());
+ //
+ 
++#ifdef USE_INTERN_STRINGS
++PyObject *createStaticString(const char *str)
++{
++     return PyUnicode_InternFromString(str);
++}
++#else
++
+ using StaticStrings = std::unordered_set<PyObject *>;
+ 
+ static void finalizeStaticStrings();    // forward
+@@ -283,6 +296,8 @@ PyObject *createStaticString(const char *str)
+     return result;
+ }
+ 
++#endif // !USE_INTERN_STRINGS
++
+ ///////////////////////////////////////////////////////////////////////
+ //
+ // PYSIDE-1019: Helper function for snake_case vs. camelCase names
diff --git a/debian/patches/make-wheels-compatible-with-Python-3.11.patch b/debian/patches/make-wheels-compatible-with-Python-3.11.patch
new file mode 100644
index 00000000..343c776f
--- /dev/null
+++ b/debian/patches/make-wheels-compatible-with-Python-3.11.patch
@@ -0,0 +1,29 @@
+From: Cristian Maureira-Fredes <Cristian.Maureira-Fredes at qt.io>
+Date: Mon, 17 Oct 2022 09:57:22 +0200
+Subject: make wheels compatible with Python 3.11
+
+These leftover mentions to <3.11 made those wheel
+impossible to install for Python 3.11
+
+Pick-to: 6.4
+Fixes: PYSIDE-2086
+Change-Id: I2a0e3f87c265e3ddc97e1036ea0137a12e895794
+Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes at qt.io>
+(cherry picked from commit d169554f2e8e57382dfc66a62e06fa75706cb649)
+---
+ build_scripts/config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build_scripts/config.py b/build_scripts/config.py
+index 63e52a2..7cbb8b6 100644
+--- a/build_scripts/config.py
++++ b/build_scripts/config.py
+@@ -137,7 +137,7 @@ class Config(object):
+         setup_kwargs['zip_safe'] = False
+         setup_kwargs['cmdclass'] = cmd_class_dict
+         setup_kwargs['version'] = package_version
+-        setup_kwargs['python_requires'] = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11"
++        setup_kwargs['python_requires'] = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.12"
+ 
+         if quiet:
+             # Tells distutils / setuptools to be quiet, and only print warnings or errors.
diff --git a/debian/patches/series b/debian/patches/series
index 91c2f4ac..c87d74ca 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,10 @@ update-sip-import.patch
 fix-spelling-errors.patch
 blacklist-failing-tests.patch
 test-with-current-interpreter.patch
+libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
+Fix-usage-of-Py_TYPE-for-Python-3.11.patch
+libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
+Shiboken-Fix-the-oldest-shiboken-bug-ever.patch
+PyEnum-make-forgiving-duplicates-work-with-Python-3.11.patch
+Fix-Property-GC-tracking-for-Python-3.11.patch
+make-wheels-compatible-with-Python-3.11.patch



More information about the Neon-commits mailing list