Skip to content

Commit 0e09ee3

Browse files
committed
Fixed build with python-3.13
According to https://docs.python.org/3.13/whatsnew/3.13.html: Remove PyEval_InitThreads() and PyEval_ThreadsInitialized() functions, deprecated in Python 3.9. Since Python 3.7, Py_Initialize() always creates the GIL: calling PyEval_InitThreads() did nothing and PyEval_ThreadsInitialized() always returned non-zero. (Contributed by Victor Stinner in python/cpython#105182.) If support for < python-3.7 is required, conditionals have to be added Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
1 parent 2f565c7 commit 0e09ee3

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/urh/dev/native/lib/airspy.pyx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ from cython.view cimport array as cvarray # needed for converting of malloc arr
77
from urh.util.Logger import logger
88

99

10-
cdef extern from "Python.h":
11-
void PyEval_InitThreads()
12-
1310
ctypedef unsigned char uint8_t
1411
ctypedef unsigned int uint32_t
1512
ctypedef unsigned long long uint64_t
@@ -81,7 +78,6 @@ cpdef int set_if_rx_gain(uint8_t vga_gain):
8178
cpdef int start_rx(callback):
8279
global f
8380
f = callback
84-
PyEval_InitThreads()
8581
cairspy.airspy_set_sample_type(_c_device, cairspy.airspy_sample_type.AIRSPY_SAMPLE_FLOAT32_IQ)
8682
return cairspy.airspy_start_rx(_c_device, _c_callback_recv, NULL)
8783

0 commit comments

Comments
 (0)