diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-18 13:39:17 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-09-20 10:18:54 +0200 |
commit | e726ec6450553d268413ab10ed68889a1c1f4fa6 (patch) | |
tree | 35532817830b353c543f7d8e364450e9d911094a /sources/shiboken6/libshiboken/basewrapper.cpp | |
parent | aa2bf383ac764c1da5e5c6d7a3e45cd3370a7fc8 (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.6 6.5 6.2 5.15
Change-Id: I506efcb44168fdc979a1d16bf33d5d5d14525e2e
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'sources/shiboken6/libshiboken/basewrapper.cpp')
-rw-r--r-- | sources/shiboken6/libshiboken/basewrapper.cpp | 4 |
1 files 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; } |