26 C APIs scheduled for removal in 3.16 are still present #154757
Copy link
Copy link
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Description
Proposal:
Doc/deprecations/c-api-pending-removal-in-3.16.rst lists 26 C APIs due to be removed in 3.16. All 26 are still in Include/ on main, still marked Py_DEPRECATED:
-
PySys_SetArgv,PySys_SetArgvEx,Py_SetProgramName,Py_SetPythonHome - the 21
Py_*global configuration variables (gh-133644: remove deprecated global configuration variables #133654 open, draft) -
Py_UNICODE
Py_SetProgramName and PySys_SetArgv were removed once in 3.13 and restored in gh-117987 after it broke packages, so this is not a mechanical removal.
The file is also not included from Doc/deprecations/index.rst, so these deprecations are currently not listed on the Deprecations page.
Has this already been discussed elsewhere?
No response given
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-C-APItype-featureA feature request or enhancementA feature request or enhancement
Activity
[-]C API deprecations due in 3.16 are missing from the Deprecations page[/-][+]26 C APIs scheduled for removal in 3.16 are still present[/+]StanFromIreland commentedon Jul 27, 2026
We intentionally don’t list them as deprecations in the docs for the version they are being removed in.
picnixz commentedon Jul 27, 2026
There are reasons why we did not yet remove some Py_Sys one becsuse they are used elsewhere.
vstinner commentedon Sep 23, 2026
I created issue gh-158001 to "remove deprecated API to configure Python initialization".
pythongh-154757: Remove deprecated PyEval_InitThreads() function
pythongh-154757: Remove deprecated PyEval_InitThreads() function
gh-154757: Remove deprecated PyEval_InitThreads() function (#158037)
pythongh-154757: No longer deprecate PyModule_GetFilename()
gh-154757: No longer deprecate PyModule_GetFilename() (#158076)