[neon/qt/pyside2/Neon/release] debian: Backport upstream patch to fix test failures with Python 3.11.5.

Dmitry Shachnev null at kde.org
Mon Oct 9 15:37:19 BST 2023


Git commit e6c948d1958db4c3a08e614e546a7becba187646 by Dmitry Shachnev.
Committed on 01/10/2023 at 19:51.
Pushed by jriddell into branch 'Neon/release'.

Backport upstream patch to fix test failures with Python 3.11.5.

M  +1    -0    debian/changelog
A  +33   -0    debian/patches/Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch
M  +1    -0    debian/patches/series

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

diff --git a/debian/changelog b/debian/changelog
index 854ea656..7bd34d6c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ pyside2 (5.15.10-4) UNRELEASED; urgency=medium
 
   [ Dmitry Shachnev ]
   * Build with LLVM 15 for now (closes: #1051886).
+  * Backport upstream patch to fix test failures with Python 3.11.5.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Sun, 17 Sep 2023 18:46:27 +0300
 
diff --git a/debian/patches/Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch b/debian/patches/Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch
new file mode 100644
index 00000000..7946f03b
--- /dev/null
+++ b/debian/patches/Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch
@@ -0,0 +1,33 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Mon, 18 Sep 2023 13:39:17 +0200
+Subject: 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
+Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh at qt.io>
+(cherry picked from commit e726ec6450553d268413ab10ed68889a1c1f4fa6)
+---
+ sources/shiboken2/libshiboken/basewrapper.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sources/shiboken2/libshiboken/basewrapper.cpp b/sources/shiboken2/libshiboken/basewrapper.cpp
+index 0832037..cb810f1 100644
+--- a/sources/shiboken2/libshiboken/basewrapper.cpp
++++ b/sources/shiboken2/libshiboken/basewrapper.cpp
+@@ -832,9 +832,9 @@ PyObject *SbkQAppTpNew(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;
+ }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 301d28ed..4b257fb5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ 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
 Fix-GLES-builds.patch
+Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch



More information about the Neon-commits mailing list