diff options
Diffstat (limited to 'dev-python/shiboken2')
5 files changed, 0 insertions, 308 deletions
diff --git a/dev-python/shiboken2/Manifest b/dev-python/shiboken2/Manifest index 51cc47ec06d4..a2d7e9c87df6 100644 --- a/dev-python/shiboken2/Manifest +++ b/dev-python/shiboken2/Manifest @@ -1,7 +1,3 @@ -AUX shiboken2-5.15.2-numpy-1.23.patch 1180 BLAKE2B 744f36a26e934c31e5f499cb07b5c4384932392e4d55303dac0aeb932533a548ce3ac385b23f16f87f7d7705bed38fb863b92acb74ad49185831f60976bcbfdb SHA512 f775c5ac6a9a7a692645f33d8bb017bafacd297777f04f4bc581bd0810b1f7ec083ceb6eb495ffc0a9a9851f72658da7bad2ed3d1604a56e9fda042cc969cac8 -AUX shiboken2-5.15.2-python310.patch 4408 BLAKE2B cd1a5c3f8c473a6667f8c942c248285babb468339283a8cc97064bd119194b72bcdb47c758044774a415cec08562b7875fd7298dea50e23d7fc3830e8291a8c1 SHA512 10245617f1aea656d3ba2e8736d51fd119e4d01c4fff129f557203bd1d5eb40ca10b40eaf55a8bd98b56f8e2e7503028818e333fee8ec86cb7b050e48a5e0387 -AUX shiboken2-5.15.2-python311-fixups.patch 2059 BLAKE2B 746cc4c4f6f29895fc4c4d6989c2d578099f5d071129cf7b8dc78fef8641d10f189b4acf9293ae178cafe196d16cfce21e4e9d85a1ff7c107e9fc611b1dfea50 SHA512 8407f2b0166f8c3aed9bef3ecc8efc6177066c4a6148b8ff942f29b3e95752f15697a8447a58e51410d6982900e9e924d38be2a8857d7f15876badddbc37b507 -AUX shiboken2-5.15.2-python311.patch 4606 BLAKE2B 40cc608b4dd5eb305809e2cd2fe2908e8f5a47dcf2a2e6efc92cbcf26604c50cd63b007d4e49b061f017a6675c57542b897fa019820a72adc4c291f798f6f01e SHA512 8403955111e8d9f9f9d8795668ab6cb19d83e9a2434593a4578905a065f706c5a4fede2f17c9e9acd8d2f9d5d0e64a54b6e65f512b147ee91f152430ac171c5b AUX shiboken2-5.15.5-add-numpy-1.23-compatibility.patch 1095 BLAKE2B 8266da9d94c67ef09ae8f80b342fc99fddbfa1efbc30ccff5408ab9c9439b4b066942b0cc0cf4064c8162f1545c7ef1b4297fb0bb7c25e87eb131767c96bd561 SHA512 5c0f76aaf9920bde858e158fe87a353cc4c4e5ce0789b28f3d2d47c5d9461c18723e1b9bb2a4f833e783ba51c7d1f57752c0ddb9512c56b01ee44d6aaa10dd83 AUX shiboken2-5.15.5-python311-1.patch 3124 BLAKE2B 97e51ae8cc6866da7ac9cced4f1988eeb00c8bbf1e033766b6f926ec16ad1dab171f15060ddaaf541f1eadfcc0fb9251df2ea613c3c16a51467d0870b378dda1 SHA512 8d11c6cc737ac99aa748e9e100a8b559aa315142f587d77f4ecae8f5ac74e65ddfb3348631203a781d445177d423f0a83307d8121b5d35ba6065e0cbb52673a8 AUX shiboken2-5.15.5-python311-2.patch 2056 BLAKE2B c93be29e31b0fa6ce28a29de0dc4dba9635e86ba0103d77334e324a0d26f4c81c9ee6583bef146eb908fe290426eb462dd0a0f68e917ca5f3c4505742d673a0f SHA512 df6f185546180b3d27d8ed1ec1ccf90cdf3813f8928894717ad02e97f0c404b8dc00aed330e8b51aa7e04d5b3e621a15981fc911b2371542f9266c147fdf3828 diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch deleted file mode 100644 index 6cd9feab800b..000000000000 --- a/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch +++ /dev/null @@ -1,28 +0,0 @@ -Backport of https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=1422cf4a7f277fb13fd209f24a90d6c02641497d. - -From 1422cf4a7f277fb13fd209f24a90d6c02641497d Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint <Friedemann.Kleint@qt.io> -Date: Thu, 23 Jun 2022 10:44:01 +0200 -Subject: libshiboken: Fix build with numpy 1.23.0 - -Pick-to: 6.3 6.2 5.15 -Change-Id: I885c332d6c948820140946c73ae1926e88834143 -Reviewed-by: Christian Tismer <tismer@stackless.com> ---- a/libshiboken/sbknumpyarrayconverter.cpp -+++ b/libshiboken/sbknumpyarrayconverter.cpp -@@ -116,8 +116,13 @@ std::ostream &operator<<(std::ostream &str, PyArrayObject *o) - str << " NPY_ARRAY_NOTSWAPPED"; - if ((flags & NPY_ARRAY_WRITEABLE) != 0) - str << " NPY_ARRAY_WRITEABLE"; -- if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0) -- str << " NPY_ARRAY_UPDATEIFCOPY"; -+#if NPY_VERSION >= 0x00000010 // NPY_1_23_API_VERSION -+ if ((flags & NPY_ARRAY_WRITEBACKIFCOPY) != 0) -+ str << " NPY_ARRAY_WRITEBACKIFCOPY"; -+#else -+ if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0) -+ str << " NPY_ARRAY_UPDATEIFCOPY"; -+#endif - } else { - str << '0'; - } diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch deleted file mode 100644 index c4f582ff71de..000000000000 --- a/dev-python/shiboken2/files/shiboken2-5.15.2-python310.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -upr libshiboken/pep384impl.cpp libshiboken/pep384impl.cpp ---- a/libshiboken/pep384impl.cpp 2020-11-11 14:51:30.000000000 +0200 -+++ b/libshiboken/pep384impl.cpp 2021-12-01 15:17:21.444888977 +0200 -@@ -751,14 +751,14 @@ _Pep_PrivateMangle(PyObject *self, PyObj - #endif // IS_PY2 - Shiboken::AutoDecRef privateobj(PyObject_GetAttr( - reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name())); --#ifndef Py_LIMITED_API -- return _Py_Mangle(privateobj, name); --#else -- // For some reason, _Py_Mangle is not in the Limited API. Why? -- size_t plen = PyUnicode_GET_LENGTH(privateobj); -+ -+ // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always. -+ // The rest of this function is our own implementation of _Py_Mangle. -+ // Please compare the original function in compile.c . -+ size_t plen = PyUnicode_GET_LENGTH(privateobj.object()); - /* Strip leading underscores from class name */ - size_t ipriv = 0; -- while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_') -+ while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_') - ipriv++; - if (ipriv == plen) { - Py_INCREF(name); -@@ -787,7 +787,6 @@ _Pep_PrivateMangle(PyObject *self, PyObj - if (amount > big_stack) - free(resbuf); - return result; --#endif // else Py_LIMITED_API - } - - /***************************************************************************** -diff -upr libshiboken/pep384impl.h libshiboken/pep384impl.h ---- a/libshiboken/pep384impl.h 2020-11-11 14:51:30.000000000 +0200 -+++ b/libshiboken/pep384impl.h 2021-12-01 15:13:58.899521842 +0200 -@@ -40,6 +40,11 @@ - #ifndef PEP384IMPL_H - #define PEP384IMPL_H - -+// PYSIDE-1436: Adapt to Python 3.10 -+#if PY_VERSION_HEX < 0x030900A4 -+# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0) -+#endif -+ - extern "C" - { - -@@ -327,7 +332,7 @@ LIBSHIBOKEN_API PyObject *PyRun_String(c - // 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 < 0x0309FFFF) -+ PY_VERSION_HEX < 0x030AFFFF) - #if !PYTHON_BUFFER_VERSION_COMPATIBLE - # error Please check the buffer compatibility for this python version! - #endif -diff -upr libshiboken/sbkstring.cpp libshiboken/sbkstring.cpp ---- a/libshiboken/sbkstring.cpp 2020-11-11 14:51:30.000000000 +0200 -+++ b/libshiboken/sbkstring.cpp 2021-12-01 15:14:47.703201473 +0200 -@@ -247,7 +247,7 @@ static void finalizeStaticStrings() - { - auto &set = staticStrings(); - for (PyObject *ob : set) { -- Py_REFCNT(ob) = 1; -+ Py_SET_REFCNT(ob, 1); - Py_DECREF(ob); - } - set.clear(); -diff -upr shibokenmodule/files.dir/shibokensupport/signature/mapping.py shibokenmodule/files.dir/shibokensupport/signature/mapping.py ---- a/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2020-11-11 14:51:30.000000000 +0200 -+++ b/shibokenmodule/files.dir/shibokensupport/signature/mapping.py 2021-12-01 15:15:14.560100869 +0200 -@@ -300,6 +300,7 @@ type_map.update({ - "zero(object)": None, - "zero(str)": "", - "zero(typing.Any)": None, -+ "zero(Any)": None, - }) - - type_map.update({ -diff -upr shibokenmodule/files.dir/shibokensupport/signature/parser.py shibokenmodule/files.dir/shibokensupport/signature/parser.py ---- a/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2020-11-11 14:51:30.000000000 +0200 -+++ b/shibokenmodule/files.dir/shibokensupport/signature/parser.py 2021-12-01 15:25:43.267843740 +0200 -@@ -43,10 +43,11 @@ import sys - import re - import warnings - import types -+import typing - import keyword - import functools - from shibokensupport.signature.mapping import (type_map, update_mapping, -- namespace, typing, _NotCalled, ResultVariable, ArrayLikeVariable) -+ namespace, _NotCalled, ResultVariable, ArrayLikeVariable) - from shibokensupport.signature.lib.tool import (SimpleNamespace, - build_brace_pattern) - -@@ -222,7 +223,7 @@ def _resolve_arraytype(thing, line): - def to_string(thing): - if isinstance(thing, str): - return thing -- if hasattr(thing, "__name__"): -+ if hasattr(thing, "__name__") and thing.__module__ != "typing": - dot = "." in str(thing) - name = get_name(thing) - return thing.__module__ + "." + name if dot else name diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch deleted file mode 100644 index 4ab435555591..000000000000 --- a/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch +++ /dev/null @@ -1,47 +0,0 @@ -The Fedora / upstream fixes (shiboken2-5.15.2-python311.patch) end up breaking -Python 3.8 compatibility (maybe 3.9 too, but didn't get that far). - -Wrap them with PY_VERSION_HEX for Python 3.11. ---- a/libshiboken/basewrapper.cpp -+++ b/libshiboken/basewrapper.cpp -@@ -366,7 +366,11 @@ SbkObjectType *SbkObject_TypeF(void) - static PyTypeObject *type = nullptr; - if (!type) { - type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec)); -- Py_SET_TYPE(type, SbkObjectType_TypeF()); -+ #if PY_VERSION_HEX < 0x030B00A1 -+ Py_TYPE(type) = SbkObjectType_TypeF(); -+ #else -+ Py_SET_TYPE(type, SbkObjectType_TypeF()); -+ #endif - Py_INCREF(Py_TYPE(type)); - type->tp_weaklistoffset = offsetof(SbkObject, weakreflist); - type->tp_dictoffset = offsetof(SbkObject, ob_dict); -@@ -1110,7 +1114,11 @@ introduceWrapperType(PyObject *enclosingObject, - typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF()); - - PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes); -- Py_SET_TYPE(heaptype, SbkObjectType_TypeF()); -+ #if PY_VERSION_HEX < 0x030B00A1 -+ Py_TYPE(heaptype) = SbkObjectType_TypeF(); -+ #else -+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF()); -+ #endif - Py_INCREF(Py_TYPE(heaptype)); - auto *type = reinterpret_cast<SbkObjectType *>(heaptype); - #if PY_VERSION_HEX < 0x03000000 ---- a/libshiboken/sbkenum.cpp -+++ b/libshiboken/sbkenum.cpp -@@ -741,7 +741,11 @@ newTypeWithName(const char *name, - copyNumberMethods(numbers_fromFlag, newslots, &idx); - newspec.slots = newslots; - auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&newspec)); -- Py_SET_TYPE(type, SbkEnumType_TypeF()); -+ #if PY_VERSION_HEX < 0x030B00A1 -+ Py_TYPE(type) = SbkEnumType_TypeF(); -+ #else -+ Py_SET_TYPE(type, SbkEnumType_TypeF()); -+ #endif - - auto *enumType = reinterpret_cast<SbkEnumType *>(type); - PepType_SETP(enumType)->cppName = cppName; diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-python311.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-python311.patch deleted file mode 100644 index 063861a1cb1a..000000000000 --- a/dev-python/shiboken2/files/shiboken2-5.15.2-python311.patch +++ /dev/null @@ -1,125 +0,0 @@ -https://src.fedoraproject.org/fork/pviktori/rpms/python-pyside2/raw/5da9902bd8732b49eb722d71f306d4ab197c84b8/f/python3.11.patch -https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=52df3b8f64 -https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=73adefe22f -https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=a09a1db839 - -From b64ad27d8dfeeecaaa8a98051252a32c9d998df4 Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint <Friedemann.Kleint@qt.io> -Date: Thu, 9 Jun 2022 16:50:41 +0200 -Subject: [PATCH] libshiboken: Fix a crash in Shiboken::Object::isValid() for - Python 3.11 - -The function is passed type objects for class methods, which caused -it to crash. - -The first clause did not catch this, and so it was cast to SbkObject -below. - -Add a type check to prevent this. - -Pick-to: 6.3 6.2 5.15 -Task-number: PYSIDE-1960 -Change-Id: Icfdd6fefb7156ac5961444bd5395109849a1d66e -Reviewed-by: Christian Tismer <tismer@stackless.com> -Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> ---- a/libshiboken/basewrapper.cpp -+++ b/libshiboken/basewrapper.cpp -@@ -1468,6 +1468,7 @@ bool setCppPointer(SbkObject *sbkObj, PyTypeObject *desiredType, void *cptr) - bool isValid(PyObject *pyObj) - { - if (!pyObj || pyObj == Py_None -+ || PyType_Check(pyObj) != 0 - || Py_TYPE(Py_TYPE(pyObj)) != SbkObjectType_TypeF()) { - return true; - } ---- a/libshiboken/basewrapper.cpp -+++ b/libshiboken/basewrapper.cpp -@@ -366,7 +366,7 @@ SbkObjectType *SbkObject_TypeF(void) - static PyTypeObject *type = nullptr; - if (!type) { - type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec)); -- Py_TYPE(type) = SbkObjectType_TypeF(); -+ Py_SET_TYPE(type, SbkObjectType_TypeF()); - Py_INCREF(Py_TYPE(type)); - type->tp_weaklistoffset = offsetof(SbkObject, weakreflist); - type->tp_dictoffset = offsetof(SbkObject, ob_dict); -@@ -1110,7 +1110,7 @@ introduceWrapperType(PyObject *enclosingObject, - typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF()); - - PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes); -- Py_TYPE(heaptype) = SbkObjectType_TypeF(); -+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF()); - Py_INCREF(Py_TYPE(heaptype)); - auto *type = reinterpret_cast<SbkObjectType *>(heaptype); - #if PY_VERSION_HEX < 0x03000000 ---- a/libshiboken/sbkenum.cpp -+++ b/libshiboken/sbkenum.cpp -@@ -741,7 +741,7 @@ newTypeWithName(const char *name, - copyNumberMethods(numbers_fromFlag, newslots, &idx); - newspec.slots = newslots; - auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&newspec)); -- Py_TYPE(type) = SbkEnumType_TypeF(); -+ Py_SET_TYPE(type, SbkEnumType_TypeF()); - - auto *enumType = reinterpret_cast<SbkEnumType *>(type); - PepType_SETP(enumType)->cppName = cppName; -From a09a1db8391243e6bb290ee66bb6e3afbb114c61 Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint <Friedemann.Kleint@qt.io> -Date: Fri, 24 Jun 2022 09:22:01 +0200 -Subject: libshiboken: Fix crashes with static strings in Python 3.11 - -In Python 3.11, some strings come with a refcount above decimal -1000000000, apparently indicating that they are interned. Replace the -mechanism by PyUnicode_InternFromString(). - -Task-number: PYSIDE-1960 -Pick-to: 6.3 6.2 5.15 -Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 -Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> -Reviewed-by: Christian Tismer <tismer@stackless.com> -Upstream: https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=a09a1db8391243e6bb290ee66bb6e3afbb114c61 - ---- a/libshiboken/sbkstring.cpp -+++ b/libshiboken/sbkstring.cpp -@@ -5,8 +5,14 @@ - #include "sbkstaticstrings_p.h" - #include "autodecref.h" - --#include <vector> --#include <unordered_set> -+#if PY_VERSION_HEX >= 0x030B0000 || defined(Py_LIMITED_API) -+# define USE_INTERN_STRINGS -+#endif -+ -+#ifndef USE_INTERN_STRINGS -+# include <vector> -+# include <unordered_set> -+#endif - - namespace Shiboken - { -@@ -179,6 +185,13 @@ Py_ssize_t len(PyObject *str) - // PyObject *attr = PyObject_GetAttr(obj, name()); - // - -+#ifdef USE_INTERN_STRINGS -+PyObject *createStaticString(const char *str) -+{ -+ return PyUnicode_InternFromString(str); -+} -+#else -+ - using StaticStrings = std::unordered_set<PyObject *>; - - static void finalizeStaticStrings(); // forward -@@ -225,6 +238,8 @@ PyObject *createStaticString(const char *str) - return result; - } - -+#endif // !USE_INTERN_STRINGS -+ - /////////////////////////////////////////////////////////////////////// - // - // PYSIDE-1019: Helper function for snake_case vs. camelCase names -cgit v1.2.1 - |