GeezerVison is showing github.com — C API: Remove legacy API functions to configure Python initialization · Issue #105145 · python/cpython
C API: Remove legacy API functions to configure Python initialization #105145DescriptionThe following C API functions were deprecated in Python 3.11 by issue #88279:
PySys_AddWarnOptionUnicode()
PySys_AddWarnOption()
PySys_AddXOption()
PySys_HasWarnOptions()
PySys_SetArgvEx()
PySys_SetArgv()
PySys_SetPath()
Py_SetPath()
Py_SetProgramName()
Py_SetPythonHome()
Py_SetStandardStreamEncoding()
_Py_SetProgramFullPath()
IMO it's now time to remove them: the new PyConfig API is available since Python 3.8: https://docs.python.org/dev/c-api/init_config.html
Linked PRs
Activityvstinner commented on May 31, 2023 Oh no, too bad, I forgot to deprecate PySys_ResetWarnOptions() in Python 3.11. vstinner commented on May 31, 2023 Functions like Py_GetPath() function also be deprecated. encukou commented on Jan 16, 2024 The original issue says:
I don't propose to schedule the removal of these functions, only mark them as deprecated in the documentation.
What changed? vstinner commented on Jan 16, 2024
What changed?
Issue gh-88279 was in 2021.
I wrote it in this issue description in 2023:
IMO it's now time to remove them: the new PyConfig API is available since Python 3.8: https://docs.python.org/dev/c-api/init_config.html
What changed in that the PyConfig API is now widely available and is a better API than the deprecated one. encukou commented on Feb 1, 2024
What changed in that the PyConfig API is now widely available and is a better API than the deprecated one.
It seems a PEP is needed for a full replacement. You wrote PEP-741, there are objections against the basic concept of PEP-741 :(
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|