guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: gnu: python-shiboken-2: Do not rely on _Py_


From: guix-commits
Subject: branch core-updates updated: gnu: python-shiboken-2: Do not rely on _Py_Mangle being available.
Date: Mon, 24 Apr 2023 06:46:55 -0400

This is an automated email from the git hooks/post-receive script.

andreas pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new 9e81b4da2d gnu: python-shiboken-2: Do not rely on _Py_Mangle being 
available.
9e81b4da2d is described below

commit 9e81b4da2d0626426d8d7b392b1e88caf5eb0161
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Mon Apr 24 12:01:51 2023 +0200

    gnu: python-shiboken-2: Do not rely on _Py_Mangle being available.
    
    * gnu/packages/patches/python-shiboken-2-compat.patch: Fix the patch
    according to upstream.
    
    Signed-off-by: Andreas Enge <andreas@enge.fr>
---
 .../patches/python-shiboken-2-compat.patch         | 29 +++++++++++-----------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/patches/python-shiboken-2-compat.patch 
b/gnu/packages/patches/python-shiboken-2-compat.patch
index 0c7de64395..48aa74173b 100644
--- a/gnu/packages/patches/python-shiboken-2-compat.patch
+++ b/gnu/packages/patches/python-shiboken-2-compat.patch
@@ -1,16 +1,15 @@
-Provide a declaration that's missing in Python 3.10.
+Backport a fix from 5.15.9, mentioned in [1].
 
---- 
pyside-setup-opensource-src-5.15.8/sources/shiboken2/libshiboken/sbkpython.h    
   2023-04-19 23:14:11.415337435 +0200
-+++ 
pyside-setup-opensource-src-5.15.8/sources/shiboken2/libshiboken/sbkpython.h    
   2023-04-19 23:18:09.055605606 +0200
-@@ -108,6 +108,11 @@ extern "C" {
- #if PY_MAJOR_VERSION >= 3
-     #define IS_PY3K
- 
-+extern "C" {
-+  /* In Python 3.10 this declaration is not provided by <Python.h>.  */
-+  extern PyObject* _Py_Mangle(PyObject *p, PyObject *name);
-+}
-+
-     #define PyInt_Type PyLong_Type
-     #define PyInt_Check PyLong_Check
-     #define PyInt_CheckExact PyLong_CheckExact
+[1] https://bugreports.qt.io/browse/PYSIDE-2176
+
+--- 
pyside-setup-opensource-src-5.15.8/sources/shiboken2/libshiboken/pep384impl.cpp 
   2023-04-24 11:05:48.770934499 +0200
++++ 
pyside-setup-opensource-src-5.15.8/sources/shiboken2/libshiboken/pep384impl.cpp 
   2023-04-24 11:04:51.566943936 +0200
+@@ -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
++#ifdef IS_PY2
+     return _Py_Mangle(privateobj, name);
+ #else
+     // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]