From: Friedemann Kleint Date: Mon, 18 Sep 2023 11:39:17 +0000 (+0200) Subject: Fix tests sample_privatector sample_privatedtor failing with Python 3.11.5 X-Git-Tag: archive/raspbian/5.15.10-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4b7e2a15dfec6b5a3914705d15370faa96c6731c;p=pyside2.git 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 (cherry picked from commit e726ec6450553d268413ab10ed68889a1c1f4fa6) Gbp-Pq: Name Fix-tests-sample_privatector-sample_privatedtor-failing-w.patch --- 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; }