Update the Python 3.13 compatibility patch

- the ctypes.h changes in not necessary any more
   (still valuable upstream)
 - the PyEval_InitThreads() function was removed and does nothing since 3.7
   (upstream might need a more complex patch to support Python 3.6 etc.)

Fixes https://bugzilla.redhat.com/2245793
This commit is contained in:
Miro Hrončok 2024-02-15 19:23:44 +01:00 committed by churchyard
commit dccfce06e6

View file

@ -1,12 +1,13 @@
diff -ur OpenIPMI-2.0.34/swig/OpenIPMI.i OpenIPMI-2.0.34-python/swig/OpenIPMI.i
--- OpenIPMI-2.0.34/swig/OpenIPMI.i 2024-02-11 19:52:41.555777279 +0100
+++ OpenIPMI-2.0.34-python/swig/OpenIPMI.i 2024-02-11 20:11:59.061132776 +0100
@@ -38,6 +38,7 @@
#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <ctype.h>
#ifdef HAVE_GETADDRINFO
#include <netdb.h>
Only in OpenIPMI-2.0.34-python/swig: OpenIPMI.i~
diff --git a/swig/python/OpenIPMI_lang.i b/swig/python/OpenIPMI_lang.i
index 67221fd..d150d81 100644
--- a/swig/python/OpenIPMI_lang.i
+++ b/swig/python/OpenIPMI_lang.i
@@ -541,7 +541,7 @@ static void OI_put_py_state(int current)
#else
static void init_lang(void)
{
- PyEval_InitThreads();
+ /* nothing */
}
#define OI_PY_STATE PyGILState_STATE
#define OI_PY_STATE_GET() PyGILState_Ensure()