Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python3-pyside2 for openSUSE:Factory 
checked in at 2023-06-20 16:48:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-pyside2 (Old)
 and      /work/SRC/openSUSE:Factory/.python3-pyside2.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-pyside2"

Tue Jun 20 16:48:57 2023 rev:24 rq:1093899 version:5.15.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-pyside2/python3-pyside2.changes  
2023-06-14 16:31:39.059320744 +0200
+++ 
/work/SRC/openSUSE:Factory/.python3-pyside2.new.15902/python3-pyside2.changes   
    2023-06-20 16:49:09.235648293 +0200
@@ -1,0 +2,7 @@
+Mon Jun 19 13:45:19 UTC 2023 - Dmitry Roshchin <dmitr...@opensuse.org>
+
+- Update to version 5.15.10
+- Fix python 3.11 compatibility, temporary blacklist signal_enum_test
+  * python-3.11-compatibility.patch
+
+-------------------------------------------------------------------

Old:
----
  pyside-setup-opensource-src-5.15.9-1.tar.xz

New:
----
  pyside-setup-opensource-src-5.15.10.tar.xz
  python-3.11-compatibility.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-pyside2.spec ++++++
--- /var/tmp/diff_new_pack.19gYtA/_old  2023-06-20 16:49:09.803651707 +0200
+++ /var/tmp/diff_new_pack.19gYtA/_new  2023-06-20 16:49:09.803651707 +0200
@@ -22,7 +22,7 @@
 %global __requires_exclude qmlimport\\((Charts|TextBalloonPlugin)
 
 Name:           python3-pyside2
-Version:        5.15.9
+Version:        5.15.10
 Release:        0
 Summary:        Python bindings for Qt
 # Legal:
@@ -31,7 +31,7 @@
 # shiboken2 contains files under GPL-3.0-only WITH Qt-GPL-exception-1.0
 License:        LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) AND 
GPL-2.0-only AND GPL-3.0-only WITH Qt-GPL-exception-1.0
 URL:            https://wiki.qt.io/Qt_for_Python
-Source0:        
https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.9-src/pyside-setup-opensource-src-5.15.9-1.tar.xz
+Source0:        
https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-%{version}-src/pyside-setup-opensource-src-%{version}.tar.xz
 # PATCH-FIX-OPENSUSE
 Patch0:         0001-Always-link-to-python-libraries.patch
 # PATCH-FIX-UPSTREAM
@@ -40,6 +40,10 @@
 Patch2:         0001-cmake-Don-t-assume-qhelpgenerator-is-in-PATH.patch
 # PATCH-FIX-UPSTREAM
 Patch3:         0001-Backport-Fix-GLES-builds.patch
+%if 0%{?suse_version} > 1500
+# PATCH-FIX-UPSTREAM python-3.11-compatibility.patch
+Patch4:         python-3.11-compatibility.patch
+%endif
 # Provide the PyPI names
 Provides:       python3-PySide2 = %{version}-%{release}
 Provides:       python3-shiboken2 = %{version}-%{release}
@@ -139,7 +143,7 @@
 Examples and Tutorials for the PySide2 bindings for Qt.
 
 %prep
-%autosetup -p1 -n pyside-setup-opensource-src-5.15.9
+%autosetup -p1 -n pyside-setup-opensource-src-%{version}
 
 %build
 _libsuffix=$(echo %{_lib} | cut -b4-)
@@ -217,6 +221,12 @@
 ctest_exclude_regex="$ctest_exclude_regex|registry_existence_test"
 
ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineWidgets_pyside-474-qtwebengineview"
 
ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineCore_web_engine_custom_scheme"
+
+%if 0%{?suse_version} > 1500
+# Upstream doesn't plan to add support for python > 3.10 in pyside2. Blacklist 
broken test
+ctest_exclude_regex="$ctest_exclude_regex|signal_enum_test"
+%endif
+
 %ifarch %{arm}
 # bug_307 fails on armv7l only
 ctest_exclude_regex="$ctest_exclude_regex|QtWidget_bug_307"

++++++ pyside-setup-opensource-src-5.15.9-1.tar.xz -> 
pyside-setup-opensource-src-5.15.10.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/coin/dependencies.yaml 
new/pyside-setup-opensource-src-5.15.10/coin/dependencies.yaml
--- old/pyside-setup-opensource-src-5.15.9/coin/dependencies.yaml       
2023-04-17 07:38:15.000000000 +0200
+++ new/pyside-setup-opensource-src-5.15.10/coin/dependencies.yaml      
2023-06-06 20:53:10.000000000 +0200
@@ -1,6 +1,6 @@
 product_dependency:
   ../../qt/tqtc-qt5.git:
-    ref: "36519195612b6596da28e19ea369c22c26ea4ba2"
+    ref: "67ee8a740e8a46c7dd470889ac182f465081dd1c"
 dependency_source: supermodule
 dependencies: [
       "../../qt/qt3d",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/dist/changes-5.15.10 
new/pyside-setup-opensource-src-5.15.10/dist/changes-5.15.10
--- old/pyside-setup-opensource-src-5.15.9/dist/changes-5.15.10 1970-01-01 
01:00:00.000000000 +0100
+++ new/pyside-setup-opensource-src-5.15.10/dist/changes-5.15.10        
2023-06-06 20:53:10.000000000 +0200
@@ -0,0 +1,29 @@
+Qt for Python 5.5.10 is a bug-fix release.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qtforpython/
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+*                                  PySide2                                 *
+****************************************************************************
+
+ - [PYSIDE-1893] Error "Internal C++ object already deleted." when
+                 using QWidget::nativeParentWidget() has been fixed.
+ - [PYSIDE-1939] A crash in QTextBlock.layout() has been fixed.
+
+****************************************************************************
+*                                  Shiboken2                               *
+****************************************************************************
+
+ - [PYSIDE-1933] Converters for all smart pointee base classes are now
+                 generated.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
--- 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
      2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
     2023-06-06 20:53:10.000000000 +0200
@@ -479,6 +479,11 @@
         </modify-argument>
         <inject-code class="target" position="end" file="../glue/qtgui.cpp" 
snippet="qtextblock-userdata"/>
     </modify-function>
+    <modify-function signature="layout()const"> <!-- Suppress return value 
heuristics -->
+      <modify-argument index="return">
+        <define-ownership class="target" owner="default"/>
+      </modify-argument>
+    </modify-function>
   </value-type>
   <value-type name="QTextBlockFormat">
     <enum-type name="LineHeightTypes" since="4.8" revision="4800"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
--- 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
      2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
     2023-06-06 20:53:10.000000000 +0200
@@ -2083,6 +2083,12 @@
         </modify-argument>
     </modify-function>
 
+    <modify-function signature="nativeParentWidget()const">  <!-- Suppress 
return value heuristics -->
+        <modify-argument index="return">
+          <define-ownership class="target" owner="default"/>
+        </modify-argument>
+    </modify-function>
+
     <modify-function signature="actionEvent(QActionEvent*)">
         <modify-argument index="1" invalidate-after-use="yes">
             <rename to="event"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/libpyside/signalmanager.cpp
 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/signalmanager.cpp
--- 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/libpyside/signalmanager.cpp
  2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/signalmanager.cpp
 2023-06-06 20:53:10.000000000 +0200
@@ -656,6 +656,11 @@
         QByteArray methodName = method.methodSignature();
         methodName.truncate(methodName.indexOf('('));
         Shiboken::AutoDecRef pyMethod(PyObject_GetAttrString(self, 
methodName));
+        if (pyMethod.isNull()) {
+            PyErr_Format(PyExc_AttributeError, "Slot '%s::%s' not found.",
+                         metaObject->className(), 
method.methodSignature().constData());
+            return -1;
+        }
         return SignalManager::callPythonMetaMethod(method, args, pyMethod, 
false);
     }
     return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/pyside2/pyside_version.py 
new/pyside-setup-opensource-src-5.15.10/sources/pyside2/pyside_version.py
--- old/pyside-setup-opensource-src-5.15.9/sources/pyside2/pyside_version.py    
2023-04-17 07:38:15.000000000 +0200
+++ new/pyside-setup-opensource-src-5.15.10/sources/pyside2/pyside_version.py   
2023-06-06 20:53:10.000000000 +0200
@@ -39,7 +39,7 @@
 
 major_version = "5"
 minor_version = "15"
-patch_version = "9"
+patch_version = "10"
 
 # For example: "a", "b", "rc"
 # (which means "alpha", "beta", "release candidate").
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
--- 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
       2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/generator/shiboken2/cppgenerator.cpp
      2023-06-06 20:53:10.000000000 +0200
@@ -1770,7 +1770,7 @@
         // TODO: Missing conversion to smart pointer pointer type:
 
         s << "// Register smartpointer conversion for all derived classes\n";
-        const auto classes = getBaseClasses(targetClass);
+        const auto classes = getAllAncestors(targetClass);
         for (auto k : classes) {
             if (smartPointerTypeEntry->matchesInstantiation(k->typeEntry())) {
                 if (auto smartTargetType = 
findSmartPointerInstantiation(k->typeEntry())) {
@@ -4016,7 +4016,7 @@
     if (!klass)
         return;
 
-    const auto classes = getBaseClasses(klass);
+    const auto classes = getAllAncestors(klass);
     if (classes.isEmpty())
         return;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/libshiboken/bindingmanager.cpp
 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/bindingmanager.cpp
--- 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/libshiboken/bindingmanager.cpp
     2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/bindingmanager.cpp
    2023-06-06 20:53:10.000000000 +0200
@@ -49,6 +49,7 @@
 
 #include <cstddef>
 #include <fstream>
+#include <mutex>
 #include <unordered_map>
 
 namespace Shiboken
@@ -141,6 +142,11 @@
     using DestructorEntries = std::vector<DestructorEntry>;
 
     WrapperMap wrapperMapper;
+    // Guard wrapperMapper mainly for QML which calls into the generated
+    // QObject::metaObject() and elsewhere from threads without GIL, causing
+    // crashes for example in retrieveWrapper(). std::shared_mutex was 
rejected due to:
+    // 
https://stackoverflow.com/questions/50972345/when-is-stdshared-timed-mutex-slower-than-stdmutex-and-when-not-to-use-it
+    std::recursive_mutex wrapperMapLock;
     Graph classHierarchy;
     DestructorEntries deleteInMainThread;
     bool destroying;
@@ -156,6 +162,7 @@
     // The wrapper argument is checked to ensure that the correct wrapper is 
released.
     // Returns true if the correct wrapper is found and released.
     // If wrapper argument is NULL, no such check is performed.
+    std::lock_guard<std::recursive_mutex> guard(wrapperMapLock);
     auto iter = wrapperMapper.find(cptr);
     if (iter != wrapperMapper.end() && (wrapper == nullptr || iter->second == 
wrapper)) {
         wrapperMapper.erase(iter);
@@ -167,6 +174,7 @@
 void BindingManager::BindingManagerPrivate::assignWrapper(SbkObject *wrapper, 
const void *cptr)
 {
     assert(cptr);
+    std::lock_guard<std::recursive_mutex> guard(wrapperMapLock);
     auto iter = wrapperMapper.find(cptr);
     if (iter == wrapperMapper.end())
         wrapperMapper.insert(std::make_pair(cptr, wrapper));
@@ -193,6 +201,7 @@
      * the BindingManager is being destroyed the interpreter is alredy
      * shutting down. */
     if (Py_IsInitialized()) {  // ensure the interpreter is still valid
+        std::lock_guard<std::recursive_mutex> guard(m_d->wrapperMapLock);
         while (!m_d->wrapperMapper.empty()) {
             Object::destroy(m_d->wrapperMapper.begin()->second, 
const_cast<void *>(m_d->wrapperMapper.begin()->first));
         }
@@ -208,6 +217,7 @@
 
 bool BindingManager::hasWrapper(const void *cptr)
 {
+    std::lock_guard<std::recursive_mutex> guard(m_d->wrapperMapLock);
     return m_d->wrapperMapper.find(cptr) != m_d->wrapperMapper.end();
 }
 
@@ -268,6 +278,7 @@
 
 SbkObject *BindingManager::retrieveWrapper(const void *cptr)
 {
+    std::lock_guard<std::recursive_mutex> guard(m_d->wrapperMapLock);
     auto iter = m_d->wrapperMapper.find(cptr);
     if (iter == m_d->wrapperMapper.end())
         return nullptr;
@@ -357,6 +368,7 @@
 std::set<PyObject *> BindingManager::getAllPyObjects()
 {
     std::set<PyObject *> pyObjects;
+    std::lock_guard<std::recursive_mutex> guard(m_d->wrapperMapLock);
     const WrapperMap &wrappersMap = m_d->wrapperMapper;
     auto it = wrappersMap.begin();
     for (; it != wrappersMap.end(); ++it)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/shiboken_version.py 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/shiboken_version.py
--- 
old/pyside-setup-opensource-src-5.15.9/sources/shiboken2/shiboken_version.py    
    2023-04-17 07:38:15.000000000 +0200
+++ 
new/pyside-setup-opensource-src-5.15.10/sources/shiboken2/shiboken_version.py   
    2023-06-06 20:53:10.000000000 +0200
@@ -39,7 +39,7 @@
 
 major_version = "5"
 minor_version = "15"
-patch_version = "9"
+patch_version = "10"
 
 # For example: "a", "b", "rc"
 # (which means "alpha", "beta", "release candidate").

++++++ python-3.11-compatibility.patch ++++++
Python 3.11 support backported to pyside2. Includes these commits:

https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=73adefe22f
https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=52df3b8f64
https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=da2cf03152
https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=a09a1db839
https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=ace680f4c5

Note that upstream won't support these changes.

Index: 
pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/basewrapper.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/shiboken2/libshiboken/basewrapper.cpp
+++ 
pyside-setup-opensource-src-5.15.10/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);
@@ -1161,7 +1161,7 @@ introduceWrapperType(PyObject *enclosing
     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
@@ -1526,6 +1526,7 @@ bool setCppPointer(SbkObject *sbkObj, Py
 bool isValid(PyObject *pyObj)
 {
     if (!pyObj || pyObj == Py_None
+        || PyType_Check(pyObj) != 0
         || Py_TYPE(Py_TYPE(pyObj)) != SbkObjectType_TypeF()) {
         return true;
     }
Index: 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideqflags.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/libpyside/pysideqflags.cpp
+++ 
pyside-setup-opensource-src-5.15.10/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;
Index: 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysidesignal.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/libpyside/pysidesignal.cpp
+++ 
pyside-setup-opensource-src-5.15.10/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);
     }
Index: 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideweakref.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/libpyside/pysideweakref.cpp
+++ 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideweakref.cpp
@@ -90,7 +90,7 @@ PyObject *create(PyObject *obj, PySideWe
 
     if (Py_TYPE(PySideCallableObjectTypeF()) == 0)
     {
-        Py_TYPE(PySideCallableObjectTypeF()) = &PyType_Type;
+        Py_SET_TYPE(PySideCallableObjectTypeF(), &PyType_Type);
         PyType_Ready(PySideCallableObjectTypeF());
     }
 
Index: 
pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/sbkenum.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/shiboken2/libshiboken/sbkenum.cpp
+++ 
pyside-setup-opensource-src-5.15.10/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;
Index: 
pyside-setup-opensource-src-5.15.10/sources/shiboken2/libshiboken/sbkstring.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/shiboken2/libshiboken/sbkstring.cpp
+++ 
pyside-setup-opensource-src-5.15.10/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
     return result;
 }
 
+#endif // !USE_INTERN_STRINGS
+
 ///////////////////////////////////////////////////////////////////////
 //
 // PYSIDE-1019: Helper function for snake_case vs. camelCase names
Index: pyside-setup-opensource-src-5.15.10/build_scripts/config.py
===================================================================
--- pyside-setup-opensource-src-5.15.10.orig/build_scripts/config.py
+++ pyside-setup-opensource-src-5.15.10/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
Index: 
pyside-setup-opensource-src-5.15.10/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/shiboken2/shibokenmodule/files.dir/shibokensupport/signature/lib/enum_sig.py
+++ 
pyside-setup-opensource-src-5.15.10/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)
Index: 
pyside-setup-opensource-src-5.15.10/sources/pyside2/tests/QtCore/qenum_test.py
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/tests/QtCore/qenum_test.py
+++ 
pyside-setup-opensource-src-5.15.10/sources/pyside2/tests/QtCore/qenum_test.py
@@ -195,16 +195,17 @@ class SomeClass(QObject):
     QEnum(SomeEnum)     # works even without the decorator assignment
 
 
-@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
Index: 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideproperty.cpp
===================================================================
--- 
pyside-setup-opensource-src-5.15.10.orig/sources/pyside2/libpyside/pysideproperty.cpp
+++ 
pyside-setup-opensource-src-5.15.10/sources/pyside2/libpyside/pysideproperty.cpp
@@ -104,6 +104,7 @@ static PyType_Slot PySidePropertyType_sl
     {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 *s
         // 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);
 }

Reply via email to