Jelajahi Sumber

app_python3: handle deprecated PyEval_InitThreads()

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

(cherry picked from commit ca37f9247ecb6754fbdbd210fc59158bf0f32def)
Daniel-Constantin Mierla 4 tahun lalu
induk
melakukan
f9f33d37f8
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      src/modules/app_python3/app_python3_mod.c

+ 2 - 0
src/modules/app_python3/app_python3_mod.c

@@ -346,7 +346,9 @@ int apy_load_script(void)
 	}
 
 	Py_Initialize();
+#if PY_VERSION_HEX < 0x03070000
 	PyEval_InitThreads();
+#endif
 	myThreadState = PyThreadState_Get();
 
 	PY_GIL_ENSURE;