Christophe Marin 2023-09-18 12:57:22 +00:00 committed by Git OBS Bridge
parent 2892add174
commit 3e7cc0c74a
3 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,35 @@
From 4f7c3fdd07aefcf7c0afe92baf30938736d29cef Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@qt.io>
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/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 a0e4e5311..64424298d 100644
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
+++ b/sources/shiboken2/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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 18 12:56:00 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Add patch to fix failure with Python 3.11.5:
* 0001-Fix-tests-sample_privatector-sample_privatedtor-fail.patch
-------------------------------------------------------------------
Mon Jun 19 13:45:19 UTC 2023 - Dmitry Roshchin <dmitry_r@opensuse.org>

View File

@ -44,6 +44,8 @@ Patch3: 0001-Backport-Fix-GLES-builds.patch
# 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
Provides: python3-PySide2 = %{version}-%{release}
Provides: python3-shiboken2 = %{version}-%{release}