public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/shiboken2/files/
@ 2022-09-24 10:54 Andrew Ammerlaan
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2022-09-24 10:54 UTC (permalink / raw
  To: gentoo-commits

commit:     ca5f7bea471c2233ec6d07cbbe6a4a0efbf477c6
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Sep 24 09:56:23 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 10:54:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca5f7bea

dev-python/shiboken2: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Portage 3.0.37 / pkgdev 0.2.2 / pkgcheck 0.10.15
Closes: https://github.com/gentoo/gentoo/pull/27425
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 .../files/shiboken2-5.15.2-numpy-1.23.patch        |  28 -----
 .../files/shiboken2-5.15.2-python310.patch         | 104 -----------------
 .../files/shiboken2-5.15.2-python311-fixups.patch  |  47 --------
 .../files/shiboken2-5.15.2-python311.patch         | 125 ---------------------
 4 files changed, 304 deletions(-)

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
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/shiboken2/files/
@ 2023-10-04 21:45 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2023-10-04 21:45 UTC (permalink / raw
  To: gentoo-commits

commit:     93d1dfca086bd2d4cca9d00d5952c77d38e902c6
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Wed Oct  4 15:47:24 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Oct  4 21:44:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93d1dfca

dev-python/shiboken2: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/33189
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/shiboken2-5.15.6-fix-pyside2-compile.patch          | 11 -----------
 .../shiboken2/files/shiboken2-5.15.8-py-limited-api.patch     | 11 -----------
 2 files changed, 22 deletions(-)

diff --git a/dev-python/shiboken2/files/shiboken2-5.15.6-fix-pyside2-compile.patch b/dev-python/shiboken2/files/shiboken2-5.15.6-fix-pyside2-compile.patch
deleted file mode 100644
index 1af6ad5aef7d..000000000000
--- a/dev-python/shiboken2/files/shiboken2-5.15.6-fix-pyside2-compile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libshiboken/embed/signature_bootstrap.py	2022-09-08 23:54:19.419724864 +0200
-+++ b/libshiboken/embed/signature_bootstrap.py	2022-09-08 23:55:04.494277606 +0200
-@@ -211,7 +211,7 @@
-         return self if self._mod2path.get(fullname) else None
- 
-     def load_module(self, fullname):
--        import importlib
-+        import importlib.machinery
-         import sys
- 
-         filename = self._mod2path.get(fullname)

diff --git a/dev-python/shiboken2/files/shiboken2-5.15.8-py-limited-api.patch b/dev-python/shiboken2/files/shiboken2-5.15.8-py-limited-api.patch
deleted file mode 100644
index 143eb24a103a..000000000000
--- a/dev-python/shiboken2/files/shiboken2-5.15.8-py-limited-api.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/libshiboken/pep384impl.cpp	2022-09-23 08:47:20.000000000 +0200
-+++ b/libshiboken/pep384impl.cpp	2023-01-04 08:07:17.000000000 +0100
-@@ -751,7 +751,7 @@
- #endif // IS_PY2
-     Shiboken::AutoDecRef privateobj(PyObject_GetAttr(
-         reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name()));
--#ifndef Py_LIMITED_API
-+#if !defined(Py_LIMITED_API) && PY_VERSION_HEX < 0x03010000
-     return _Py_Mangle(privateobj, name);
- #else
-     // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always.


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-04 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-24 10:54 [gentoo-commits] repo/gentoo:master commit in: dev-python/shiboken2/files/ Andrew Ammerlaan
  -- strict thread matches above, loose matches on Subject: below --
2023-10-04 21:45 Conrad Kostecki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox