all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josselin Poiret <dev@jpoiret.xyz>
To: Josselin Poiret <dev@jpoiret.xyz>,
	John Kehayias <john.kehayias@protonmail.com>,
	Guillaume Le Vaillant <glv@posteo.net>
Cc: Andreas Enge <andreas@enge.fr>, guix-devel@gnu.org
Subject: [PATCH] gnu: python-shiboken-2: Do not rely on _Py_Mangle being available.
Date: Mon, 24 Apr 2023 12:01:51 +0200	[thread overview]
Message-ID: <1ae76f128cba0775de2e2a4a2f4b05d23d44ca37.1682330511.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <87o7ndvbu5.fsf@jpoiret.xyz>

* gnu/packages/patches/python-shiboken-2-compat.patch: Fix the patch according
to upstream.
---
 .../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.

base-commit: 827df9d1dde4f4a06e1789ec17cf0586602aa121
-- 
2.39.2



  reply	other threads:[~2023-04-24 10:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  7:30 Core-updates, the last metres Andreas Enge
2023-04-23 18:51 ` John Kehayias
2023-04-23 19:25   ` Andreas Enge
2023-04-23 20:00   ` Guillaume Le Vaillant
2023-04-23 21:12     ` John Kehayias
2023-04-24 10:00       ` Josselin Poiret
2023-04-24 10:01         ` Josselin Poiret [this message]
2023-04-24 10:57           ` [PATCH] gnu: python-shiboken-2: Do not rely on _Py_Mangle being available Andreas Enge
2023-04-23 23:32     ` python-ledgerblue as input for electrum? (was: Core-updates, the last metres) Vagrant Cascadian
2023-04-23 23:45       ` John Kehayias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ae76f128cba0775de2e2a4a2f4b05d23d44ca37.1682330511.git.dev@jpoiret.xyz \
    --to=dev@jpoiret.xyz \
    --cc=andreas@enge.fr \
    --cc=glv@posteo.net \
    --cc=guix-devel@gnu.org \
    --cc=john.kehayias@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.