Skip to content

Commit d40dca1

Browse files
committed
Dont use deprecated PyEval_ThreadsInitialized for version > 3.7
1 parent b501dbd commit d40dca1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PythonQt.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ PythonQt::PythonQt(int flags, const QByteArray& pythonQtModuleName)
354354
Py_Initialize();
355355
}
356356

357-
#ifdef PYTHONQT_FULL_THREAD_SUPPORT
358-
if (!PyEval_ThreadsInitialized()) {
359-
PyEval_InitThreads();
360-
}
357+
#if defined(PYTHONQT_FULL_THREAD_SUPPORT) && PY_VERSION_HEX < 0x03090000
358+
if (!PyEval_ThreadsInitialized()) {
359+
PyEval_InitThreads();
360+
}
361361
#endif
362362

363363
// add our own python object types for qt object slots

0 commit comments

Comments
 (0)