ITK icon indicating copy to clipboard operation
ITK copied to clipboard

PyEval_InitThreads is deprecated in Python 3.9

Open dzenanz opened this issue 2 years ago • 3 comments

This occurs many times when compiling Python wrappings. Example message:

122>vnl_vector_refPython.cpp
122>C:\Dev\ITK-py\Wrapping\Modules\ITKCommon\vnl_vector_refPython.cpp(7653,3): warning C4996: 'PyEval_InitThreads': deprecated in 3.9

Tested on master branch, but probably affects all versions.

dzenanz avatar Apr 06 '22 17:04 dzenanz

It looks like we only need to use a newer version of SWIG: https://github.com/swig/swig/issues/1996.

dzenanz avatar Apr 06 '22 17:04 dzenanz

SWIG changed the build system to CMake. https://github.com/InsightSoftwareConsortium/ITK/blob/master/Wrapping/Generators/SwigInterface/CMakeLists.txt will need to be rewritten. I expect serious simplification and probable unification of Win and *nix versions.

dzenanz avatar Apr 13 '22 17:04 dzenanz

We could maybe bundle it as a third-party library and update it more frequently using the existing infrastructure?

dzenanz avatar Apr 13 '22 17:04 dzenanz