Drop patches that are already part of upstream

This commit is contained in:
Jan Grulich 2023-10-16 08:40:03 +02:00
parent b640a6f4f6
commit dee4310d4a
3 changed files with 0 additions and 70 deletions

View File

@ -1,29 +0,0 @@
From 8d7bede5ac43fad34383c7a507fdf7f8fb6a5c68 Mon Sep 17 00:00:00 2001
From: Phil Thompson <phil@riverbankcomputing.com>
Date: Wed, 21 Jun 2023 14:38:45 +0200
Subject: [PATCH] For Python v3.12 implement sipPyTypeDict() using
PyType_GetDict().
---
sip_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sip_core.c b/sip_core.c
index a51513f..7203bce 100644
--- a/sip_core.c
+++ b/sip_core.c
@@ -11112,7 +11112,11 @@ static void *sip_api_get_type_user_data(const sipWrapperType *wt)
*/
static PyObject *sip_api_py_type_dict(const PyTypeObject *py_type)
{
+#if PY_VERSION_HEX >= 0x030c0000
+ return PyType_GetDict(py_type);
+#else
return py_type->tp_dict;
+#endif
}
--
2.40.1

View File

@ -12,11 +12,6 @@ Summary: The sip module support for PyQt6
License: GPL-2.0-only OR GPL-3.0-only
URL: https://www.riverbankcomputing.com/software/sip/
Source0: %{pypi_source}
# Patches needed for compatibility with Python 3.12
# https://www.riverbankcomputing.com/hg/sip/rev/312476401030
Patch: sipMalloc-and-sipFree-are-now-implemented-using-PyMe.patch
# https://www.riverbankcomputing.com/hg/sip/rev/d36867e54192
Patch: For-Python-v3.12-implement-sipPyTypeDict-using-PyTyp.patch
BuildRequires: gcc
BuildRequires: python3-devel

View File

@ -1,36 +0,0 @@
From 9c13eac1177f90a44f811f265ea8e4caa41879c9 Mon Sep 17 00:00:00 2001
From: Phil Thompson <phil@riverbankcomputing.com>
Date: Wed, 21 Jun 2023 14:30:26 +0200
Subject: [PATCH] sipMalloc() and sipFree() are now implemented using
PyMem_RawMalloc() and PyMem_RawFree() so that they should be safe to call
from functions registered with Py_AtExit().
---
sip_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sip_core.c b/sip_core.c
index f763090..a51513f 100644
--- a/sip_core.c
+++ b/sip_core.c
@@ -1886,7 +1886,7 @@ void *sip_api_malloc(size_t nbytes)
{
void *mem;
- if ((mem = PyMem_Malloc(nbytes)) == NULL)
+ if ((mem = PyMem_RawMalloc(nbytes)) == NULL)
PyErr_NoMemory();
return mem;
@@ -1898,7 +1898,7 @@ void *sip_api_malloc(size_t nbytes)
*/
void sip_api_free(void *mem)
{
- PyMem_Free(mem);
+ PyMem_RawFree(mem);
}
--
2.40.1