diff options
-rw-r--r-- | sources/pyside6/PySide6/glue/qtcore.cpp | 3 | ||||
-rw-r--r-- | sources/shiboken6/libshiboken/pep384impl.h | 7 | ||||
-rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp index a2625e65b..68fcdcd05 100644 --- a/sources/pyside6/PySide6/glue/qtcore.cpp +++ b/sources/pyside6/PySide6/glue/qtcore.cpp @@ -672,7 +672,7 @@ static int SbkQByteArray_getbufferproc(PyObject *obj, Py_buffer *view, int flags QByteArray * cppSelf = %CONVERTTOCPP[QByteArray *](obj); //XXX /|\ omitting this space crashes shiboken! - #ifdef Py_LIMITED_API +#ifdef Py_LIMITED_API view->obj = obj; view->buf = reinterpret_cast<void *>(cppSelf->data()); view->len = cppSelf->size(); @@ -903,7 +903,6 @@ auto *pyTimer = timerType->tp_new(Shiboken::SbkType<QTimer>(), emptyTuple, nullp timerType->tp_init(pyTimer, emptyTuple, nullptr); auto timer = %CONVERTTOCPP[QTimer *](pyTimer); -//XXX /|\ omitting this space crashes shiboken! Shiboken::AutoDecRef result( PyObject_CallMethod(pyTimer, "connect", "OsOs", pyTimer, diff --git a/sources/shiboken6/libshiboken/pep384impl.h b/sources/shiboken6/libshiboken/pep384impl.h index b5cf10962..05743fbba 100644 --- a/sources/shiboken6/libshiboken/pep384impl.h +++ b/sources/shiboken6/libshiboken/pep384impl.h @@ -305,11 +305,8 @@ LIBSHIBOKEN_API PyObject *PyRun_String(const char *, int, PyObject *, PyObject * // buffer functions. // But this is no problem as we check it's validity for every version. -#define PYTHON_BUFFER_VERSION_COMPATIBLE (PY_VERSION_HEX >= 0x03030000 && \ - PY_VERSION_HEX < 0x030C0000) -#if !PYTHON_BUFFER_VERSION_COMPATIBLE -# error Please check the buffer compatibility for this python version! -#endif +// PYSIDE-1960 The buffer interface is since Python 3.11 part of the stable +// API and we do not need to check the compatibility by hand anymore. typedef struct { getbufferproc bf_getbuffer; diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py index d5fd47e04..ffb8badb5 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py @@ -66,6 +66,10 @@ def _get_flag_enum_option(): if pyminver and pyminver >= (3, 8): warnings.warn(f"\n *** Python is at version {'.'.join(map(str, pyminver))} now. " f"The file pep384_issue33738.cpp should be removed ASAP! ***") + # PYSIDE-1960: Emit a warning when we may remove pep384_issue33738.cpp + if pyminver and pyminver >= (3, 11): + warnings.warn(f"\n *** Python is at version {'.'.join(map(str, pyminver))} now. " + f"The files bufferprocs_py37.(cpp|h) should be removed ASAP! ***") # PYSIDE-1735: Emit a warning when we may update enum_310.py if pymaxver and pymaxver > (3, 10): if sys.version_info >= (3, 11, 0) and sys.version_info.releaselevel == "final": |