PyEval_InitThreads() is deprecated

`Py_Initialize()` does it since 3.7, it's a noop and deprecated since 3.9.

https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel
2024-11-22 16:32:08 +01:00
parent 80193ca41f
commit 06f5c2670e

View File

@@ -1609,7 +1609,9 @@ python_init_prof(void)
#ifdef PY_IS_PYTHON3
PyImport_AppendInittab("prof", python_api_init);
Py_Initialize();
#if PY_VERSION_HEX < 0x03070000
PyEval_InitThreads();
#endif
#else
Py_Initialize();
PyEval_InitThreads();