Skip to content

Fix PyEval_InitThreads() and PyEval_ThreadsInitialized() deprecated warnings . Part II

Same changeset as !45559 (merged)

In all devLCG4 releases we see warnings

cvmfs/sft.cern.ch/lcg/releases/Python/3.9.5-82945/x86_64-centos7-gcc8-opt/include/python3.9/ceval.h:129:36: note: declared here
 Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
/build/atnight/localbuilds/nightlies/master--dev4LCG/athena/Control/AthenaServices/src/initPyInterpreter.cxx:66:34: warning: 'int PyEval_ThreadsInitialized()' is deprecated [-Wdeprecated-declarations]
   if (!PyEval_ThreadsInitialized()) {

note that : https://docs.python.org/3/whatsnew/3.9.html

The PyEval_InitThreads() and PyEval_ThreadsInitialized() functions are now deprecated and will be removed in Python 3.11. Calling PyEval_InitThreads() now does nothing. The GIL is initialized by Py_Initialize() since Python 3.7. (Contributed by Victor Stinner in bpo-39877.)

Merge request reports