PySys_SetArgv(), PySys_SetArgvEx(), Py_SetProgramName() and Py_SetPythonHome() are deprecated since Python 3.11 and planned for removal in Python 3.16.
The "global configuration variables" such as Py_IgnoreEnvironmentFlag are deprecated since Python 3.11 and planned for removal in Python 3.16.
I'm working on changes to remove these APIs. The PyInitConfig API (Python 3.14) or the PyConfig API (Python 3.8) can be used instead. Reading global configuration variables can be replaced with PyConfig_Get().
In May 2025, there was a first attempt to remove global configuration variables. A code search found 20 projects still using these variables. The removal was (postponed)(#149594) from Python 3.15 to Python 3.16.
See also issue gh-154757 "26 C APIs scheduled for removal in 3.16 are still present".
Linked PRs
PySys_SetArgv(), PySys_SetArgvEx(), Py_SetProgramName() and Py_SetPythonHome() are deprecated since Python 3.11 and planned for removal in Python 3.16.
The "global configuration variables" such as Py_IgnoreEnvironmentFlag are deprecated since Python 3.11 and planned for removal in Python 3.16.
I'm working on changes to remove these APIs. The
PyInitConfigAPI (Python 3.14) or thePyConfigAPI (Python 3.8) can be used instead. Reading global configuration variables can be replaced with PyConfig_Get().In May 2025, there was a first attempt to remove global configuration variables. A code search found 20 projects still using these variables. The removal was (postponed)(#149594) from Python 3.15 to Python 3.16.
See also issue gh-154757 "26 C APIs scheduled for removal in 3.16 are still present".
Linked PRs