Add patch for compatibility with Python 3.11
This commit is contained in:
parent
23c09ce46d
commit
f571fb1ac7
31
0001-Py-3.11-fix.patch
Normal file
31
0001-Py-3.11-fix.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From d9d7e72154aa4434538410357de8b90bf6e573d1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||
Date: Wed, 23 Mar 2022 09:26:55 +0100
|
||||
Subject: [PATCH] Py 3.11 fix
|
||||
|
||||
---
|
||||
sipbuild/module/source/12/siplib.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/sipbuild/module/source/12/siplib.c b/sipbuild/module/source/12/siplib.c
|
||||
index 2d74650..3412364 100644
|
||||
--- a/sipbuild/module/source/12/siplib.c
|
||||
+++ b/sipbuild/module/source/12/siplib.c
|
||||
@@ -12750,7 +12750,14 @@ static struct _frame *sip_api_get_frame(int depth)
|
||||
|
||||
while (frame != NULL && depth > 0)
|
||||
{
|
||||
+#if PY_VERSION_HEX < 0x03090000
|
||||
frame = frame->f_back;
|
||||
+#else
|
||||
+ frame = PyFrame_GetBack(frame);
|
||||
+
|
||||
+ /* Historically we return a borrowed reference. */
|
||||
+ Py_XDECREF(frame);
|
||||
+#endif
|
||||
--depth;
|
||||
}
|
||||
|
||||
--
|
||||
2.33.1
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Name: sip6
|
||||
Version: 6.5.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: SIP - Python/C++ Bindings Generator
|
||||
%py_provides python3-sip6
|
||||
# Remove when F34 is EOL
|
||||
@ -13,6 +13,7 @@ Obsoletes: sip5 < 6.0.0
|
||||
License: (GPLv2 or GPLv3) and (GPLv2+ with exceptions)
|
||||
URL: https://www.riverbankcomputing.com/software/sip
|
||||
Source0: %{pypi_source}
|
||||
Patch1: 0001-Py-3.11-fix.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python3-devel
|
||||
@ -48,6 +49,9 @@ Python bindings for wxWidgets.}
|
||||
%{python3_sitearch}/sipbuild/
|
||||
|
||||
%changelog
|
||||
* Wed Jun 15 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 6.5.1-3
|
||||
- Add patch for Python 3.11 compatibility
|
||||
|
||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 6.5.1-2
|
||||
- Rebuilt for Python 3.11
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user