From 87dc486033ca97801b9c52e183e76a7b103f6286 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Mon, 1 Jul 2024 09:10:55 +0200 Subject: [PATCH] Don't check for Python 2 and don't use the deprecated PySys_SetArgv --- DDG4/tpython/DDPython.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/DDG4/tpython/DDPython.cpp b/DDG4/tpython/DDPython.cpp index 1bcf77d58..9500ca06b 100644 --- a/DDG4/tpython/DDPython.cpp +++ b/DDG4/tpython/DDPython.cpp @@ -207,10 +207,6 @@ void dd4hep::DDPython::restoreThread() { } int dd4hep::DDPython::setArgs(int argc, char** argv) const { - // Need to protect against API change from Python 2 to Python 3 -#if PY_VERSION_HEX < 0x03000000 - ::PySys_SetArgv(argc,argv); -#else std::vector wargs; std::vector wargv; for(int i=0; i wargs; std::vector wargv; for(int i=0; i