python: disable deprecated API for newer versions ()

This commit is contained in:
Anton Kochkov 2023-08-02 15:21:53 +08:00 committed by GitHub
parent de0e55d684
commit 08d5c7aed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,9 @@ void PythonManager::initialize()
#endif
Py_Initialize();
// This function is deprecated does nothing starting from Python 3.9
#if (PY_MAJOR_VERSION <= 3) && (PY_MICRO_VERSION < 9)
PyEval_InitThreads();
#endif
pyThreadStateCounter = 1; // we have the thread now => 1
RegQtResImporter();