aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-18 13:39:17 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-20 22:04:07 +0000
commitc7df6c4acc5be75349361f3010365d02e75fd261 (patch)
tree80c646fba140b44c27b0f86f5b46299cba361685
parent307ccffe76331a712bece1b8083f338fa3c4a8bd (diff)
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.2 5.15 Change-Id: I506efcb44168fdc979a1d16bf33d5d5d14525e2e Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> (cherry picked from commit e726ec6450553d268413ab10ed68889a1c1f4fa6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 59b2ebea6b89bb882ccc2014feb8e1ee49d0fe32)
-rw-r--r--sources/shiboken6/libshiboken/basewrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/libshiboken/basewrapper.cpp b/sources/shiboken6/libshiboken/basewrapper.cpp
index cf31b064a..65a51454c 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;
}