From 170f18d7d983ad895ada495c15ac4ce5c76636ae599edf337b87961233e63f97 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Mon, 18 Sep 2023 12:54:49 +0000 Subject: [PATCH] factory fix OBS-URL: https://build.opensuse.org/package/show/KDE:Qt6/python3-pyside6?expand=0&rev=46 --- ..._privatector-sample_privatedtor-fail.patch | 35 +++++++++++++++++++ python3-pyside6.changes | 6 ++++ python3-pyside6.spec | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch diff --git a/0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch b/0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch new file mode 100644 index 0000000..b2ccd20 --- /dev/null +++ b/0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch @@ -0,0 +1,35 @@ +From 4f7c3fdd07aefcf7c0afe92baf30938736d29cef Mon Sep 17 00:00:00 2001 +From: Friedemann Kleint +Date: Mon, 18 Sep 2023 13:39:17 +0200 +Subject: [PATCH] Fix tests sample_privatector sample_privatedtor failing with + Python 3.11.5 + +Remove special characters from the format string as they cause: +ValueError PyUnicode_FromFormatV() expects an ASCII-encoded format string, got a non-ASCII byte: 0xc2 + +Fixes: PYSIDE-2465 +Pick-to: 6.6 6.5 6.2 5.15 +Change-Id: I506efcb44168fdc979a1d16bf33d5d5d14525e2e +--- + sources/shiboken6/libshiboken/basewrapper.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sources/shiboken6/libshiboken/basewrapper.cpp b/sources/shiboken6/libshiboken/basewrapper.cpp +index a0e4e5311..64424298d 100644 +--- a/sources/shiboken6/libshiboken/basewrapper.cpp ++++ b/sources/shiboken6/libshiboken/basewrapper.cpp +@@ -601,9 +601,9 @@ PyObject *SbkQApp_tp_new(PyTypeObject *subtype, PyObject *, PyObject *) + PyObject *SbkDummyNew(PyTypeObject *type, PyObject *, PyObject *) + { + // PYSIDE-595: Give the same error as type_call does when tp_new is NULL. ++ const char regret[] = "¯\\_(ツ)_/¯"; + PyErr_Format(PyExc_TypeError, +- "cannot create '%.100s' instances ¯\\_(ツ)_/¯", +- type->tp_name); ++ "cannot create '%.100s' instances %s", type->tp_name, regret); + return nullptr; + } + +-- +2.42.0 + diff --git a/python3-pyside6.changes b/python3-pyside6.changes index eebdbb1..0c8c610 100644 --- a/python3-pyside6.changes +++ b/python3-pyside6.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 18 12:54:20 UTC 2023 - Christophe Marin + +- Add patch to fix failure with Python 3.11.5: + * 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch + ------------------------------------------------------------------- Wed Jul 26 10:48:26 UTC 2023 - Christophe Marin diff --git a/python3-pyside6.spec b/python3-pyside6.spec index de39a7e..2a3df66 100644 --- a/python3-pyside6.spec +++ b/python3-pyside6.spec @@ -34,6 +34,8 @@ URL: https://www.qt.io Source: https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/QtForPython/pyside6/PySide6-%{version}-src/%{tar_name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE Patch0: 0001-Always-link-to-python-libraries.patch +# PATCH-FIX-UPSTREAM +Patch1: 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch # SECTION common_dependencies BuildRequires: clang-devel BuildRequires: fdupes