Accepting request 1121377 from home:krop:branches:KDE:Qt5

Update to 5.15.11

OBS-URL: https://build.opensuse.org/request/show/1121377
OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/python3-pyside2?expand=0&rev=82
This commit is contained in:
Christophe Marin 2023-10-31 09:52:18 +00:00 committed by Git OBS Bridge
parent 3e7cc0c74a
commit 9c3e84c0dc
7 changed files with 26 additions and 271 deletions

View File

@ -1,45 +0,0 @@
From b078923c003f0e6048c37a8a4b20415e4bec9c72 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Fri, 1 Jul 2022 09:59:08 +0200
Subject: [PATCH] Backport: Fix GLES builds
Add QOpenGLVersionFunctionsFactory to list of dropped entries.
Backported from Ie203372c2d15776a466f0fa04fe32a777bf85e52
Task-number: PYSIDE-1636
Change-Id: I4507820eb0ac897abe8a3a28b3de16f3dd8250d5
---
sources/pyside2/PySide2/QtGui/CMakeLists.txt | 2 +-
sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sources/pyside2/PySide2/QtGui/CMakeLists.txt b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
index c4a38a184..0306543ac 100644
--- a/sources/pyside2/PySide2/QtGui/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtGui/CMakeLists.txt
@@ -227,7 +227,7 @@ endif()
list(FIND QtGui_enabled_features "opengles2" _opengles2Index)
# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtGui_enabled_features)
if(_opengles2Index GREATER -1)
- list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
+ list(APPEND QtGui_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory)
message(STATUS "Qt${QT_MAJOR_VERSION}Gui: Dropping Desktop OpenGL classes (GLES2)")
else()
list(APPEND QtGui_SRC
diff --git a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
index 383afb68f..03c4fd046 100644
--- a/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
+++ b/sources/pyside2/PySide2/QtOpenGLFunctions/CMakeLists.txt
@@ -11,7 +11,7 @@ set(QtOpenGLFunctions_SRC ${QtOpenGLFunctions_GEN_DIR}/qtopenglfunctions_module_
list(FIND QtOpenGLFunctions_enabled_features "opengles2" _opengles2Index)
# ### fixme: For cmake >= 3.3: if(opengles2 IN_LIST QtOpenGLFunctions_enabled_features)
if(_opengles2Index GREATER -1)
- list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery)
+ list(APPEND QtOpenGLFunctions_DROPPED_ENTRIES QOpenGLTimeMonitor QOpenGLTimerQuery QOpenGLVersionFunctionsFactory)
list(APPEND QtOpenGLFunctions_SRC
${QtOpenGLFunctions_GEN_DIR}/qopenglfunctions_es2_wrapper.cpp)
message(STATUS "Qt${QT_MAJOR_VERSION}OpenGLFunctions: Dropping Desktop OpenGL classes (GLES2)")
--
2.36.1

View File

@ -1,7 +1,7 @@
From cb7de1027430cdf0ecbe4e75134239a8987199a2 Mon Sep 17 00:00:00 2001 From 4d1ad8ef85e746dcb22fb87e23a8b0fdb7a7ccf2 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr> From: Christophe Giboudeaux <christophe@krop.fr>
Date: Tue, 15 Sep 2020 08:44:52 +0200 Date: Tue, 15 Sep 2020 08:44:52 +0200
Subject: [PATCH] [cmake] Don't assume qhelpgenerator is in PATH Subject: [PATCH] Don't assume qhelpgenerator is in PATH
There is no guarantee the qhelpgenerator executable is in PATH. There is no guarantee the qhelpgenerator executable is in PATH.
The build system will use the the Qt5::qhelpgenerator target The build system will use the the Qt5::qhelpgenerator target
@ -12,10 +12,10 @@ to get the exact location.
2 files changed, 11 insertions(+), 3 deletions(-) 2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt
index ffbb3c1..e578aad 100644 index 950e486..4b0c7dc 100644
--- a/sources/pyside2/doc/CMakeLists.txt --- a/sources/pyside2/doc/CMakeLists.txt
+++ b/sources/pyside2/doc/CMakeLists.txt +++ b/sources/pyside2/doc/CMakeLists.txt
@@ -132,10 +132,14 @@ if(DOC_OUTPUT_FORMAT STREQUAL "html") @@ -138,10 +138,14 @@ if(DOC_OUTPUT_FORMAT STREQUAL "html")
COMMENT "Copying Shiboken docs..." COMMENT "Copying Shiboken docs..."
VERBATIM) VERBATIM)
else() else()
@ -32,10 +32,10 @@ index ffbb3c1..e578aad 100644
VERBATIM) VERBATIM)
endif() endif()
diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt
index 9fee962..dee13f3 100644 index ae4858f..fb2a62d 100644
--- a/sources/shiboken2/doc/CMakeLists.txt --- a/sources/shiboken2/doc/CMakeLists.txt
+++ b/sources/shiboken2/doc/CMakeLists.txt +++ b/sources/shiboken2/doc/CMakeLists.txt
@@ -33,11 +33,15 @@ except: @@ -36,11 +36,15 @@ except:
# create a custom command to generate QCH # create a custom command to generate QCH
if(DOC_OUTPUT_FORMAT STREQUAL "qthelp") if(DOC_OUTPUT_FORMAT STREQUAL "qthelp")
@ -54,5 +54,5 @@ index 9fee962..dee13f3 100644
endif() endif()
else() else()
-- --
2.28.0 2.42.0

BIN
pyside-setup-opensource-src-5.15.10.tar.xz (Stored with Git LFS)

Binary file not shown.

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da567cd3b7854d27a0b4afe3e89de8b2f98b7a6d57393be56f1fc13f770faf29
size 3584760

View File

@ -1,206 +0,0 @@
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);
}

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Mon Oct 30 14:19:25 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Update to 5.15.11
* Documentation regarding the clang environment variables has been fixed.
* Support for Python 3.11 has been added.
* The GLES build has been fixed.
* Crashes when using QtDataVisualization's QValue3DAxisFormatter have been fixed.
- Drop patches, merged upstream:
* 0001-Backport-Fix-GLES-builds.patch
* python-3.11-compatibility.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 18 12:56:00 UTC 2023 - Christophe Marin <christophe@krop.fr> Mon Sep 18 12:56:00 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@ -22,7 +22,7 @@
%global __requires_exclude qmlimport\\((Charts|TextBalloonPlugin) %global __requires_exclude qmlimport\\((Charts|TextBalloonPlugin)
Name: python3-pyside2 Name: python3-pyside2
Version: 5.15.10 Version: 5.15.11
Release: 0 Release: 0
Summary: Python bindings for Qt Summary: Python bindings for Qt
# Legal: # Legal:
@ -39,13 +39,7 @@ Patch1: 0001-Don-t-try-to-install-or-use-uic-rcc-designer-copies.patch
# PATCH-FIX-UPSTREAM # PATCH-FIX-UPSTREAM
Patch2: 0001-cmake-Don-t-assume-qhelpgenerator-is-in-PATH.patch Patch2: 0001-cmake-Don-t-assume-qhelpgenerator-is-in-PATH.patch
# PATCH-FIX-UPSTREAM # PATCH-FIX-UPSTREAM
Patch3: 0001-Backport-Fix-GLES-builds.patch Patch3: 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch
%if 0%{?suse_version} > 1500
# PATCH-FIX-UPSTREAM python-3.11-compatibility.patch
Patch4: python-3.11-compatibility.patch
%endif
# PATCH-FIX-UPSTREAM
Patch5: 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch
# Provide the PyPI names # Provide the PyPI names
Provides: python3-PySide2 = %{version}-%{release} Provides: python3-PySide2 = %{version}-%{release}
Provides: python3-shiboken2 = %{version}-%{release} Provides: python3-shiboken2 = %{version}-%{release}
@ -225,8 +219,8 @@ ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineWidgets_pyside-474-qtwebeng
ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineCore_web_engine_custom_scheme" ctest_exclude_regex="$ctest_exclude_regex|QtWebEngineCore_web_engine_custom_scheme"
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
# Upstream doesn't plan to add support for python > 3.10 in pyside2. Blacklist broken test # Blacklist broken test with python 3.11
ctest_exclude_regex="$ctest_exclude_regex|signal_enum_test" ctest_exclude_regex="$ctest_exclude_regex|signal_enum_test|QtCore_qenum_test"
%endif %endif
%ifarch %{arm} %ifarch %{arm}