diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-01 07:14:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 07:14:02 (GMT) |
commit | 424049cc1117d66dfa86196ee5f694c15b46ac6c (patch) | |
tree | 92dbbd5558deb687efb53e653d667ba6af608930 /Misc | |
parent | 8ed705c083e8e5ff37649d998a8b1524ec921519 (diff) | |
download | cpython-424049cc1117d66dfa86196ee5f694c15b46ac6c.zip cpython-424049cc1117d66dfa86196ee5f694c15b46ac6c.tar.gz cpython-424049cc1117d66dfa86196ee5f694c15b46ac6c.tar.bz2 |
gh-105145: Remove old functions to config Python init (#105154)
Remove the following old functions to configure the Python
initialization, deprecated in Python 3.11:
* PySys_AddWarnOptionUnicode()
* PySys_AddWarnOption()
* PySys_AddXOption()
* PySys_HasWarnOptions()
* PySys_SetArgvEx()
* PySys_SetArgv()
* PySys_SetPath()
* Py_SetPath()
* Py_SetProgramName()
* Py_SetPythonHome()
* Py_SetStandardStreamEncoding()
* _Py_SetProgramFullPath()
Most of these functions are kept in the stable ABI, except:
* Py_SetStandardStreamEncoding()
* _Py_SetProgramFullPath()
Update Doc/extending/embedding.rst and Doc/extending/extending.rst to
use the new PyConfig API.
_testembed.c:
* check_stdio_details() now sets stdio_encoding and stdio_errors
of PyConfig.
* Add definitions of functions removed from the API but kept in the
stable ABI.
* test_init_from_config() and test_init_read_set() now use
PyConfig_SetString() instead of PyConfig_SetBytesString().
Remove _Py_ClearStandardStreamEncoding() internal function.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/C API/2023-05-31-16-51-18.gh-issue-105145.b3B6lJ.rst | 17 | ||||
-rw-r--r-- | Misc/stable_abi.toml | 10 |
2 files changed, 27 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2023-05-31-16-51-18.gh-issue-105145.b3B6lJ.rst b/Misc/NEWS.d/next/C API/2023-05-31-16-51-18.gh-issue-105145.b3B6lJ.rst new file mode 100644 index 0000000..a3ad765 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2023-05-31-16-51-18.gh-issue-105145.b3B6lJ.rst @@ -0,0 +1,17 @@ +Remove the following old functions to configure the Python initialization, +deprecated in Python 3.11: + +* ``PySys_AddWarnOptionUnicode()`` +* ``PySys_AddWarnOption()`` +* ``PySys_AddXOption()`` +* ``PySys_HasWarnOptions()`` +* ``PySys_SetArgvEx()`` +* ``PySys_SetArgv()`` +* ``PySys_SetPath()`` +* ``Py_SetPath()`` +* ``Py_SetProgramName()`` +* ``Py_SetPythonHome()`` +* ``Py_SetStandardStreamEncoding()`` +* ``_Py_SetProgramFullPath()`` + +Patch by Victor Stinner. diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index ff3b09c..7ff4da9 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -1311,8 +1311,10 @@ added = '3.2' [function.PySys_AddWarnOption] added = '3.2' + abi_only = true [function.PySys_AddWarnOptionUnicode] added = '3.2' + abi_only = true [function.PySys_FormatStderr] added = '3.2' [function.PySys_FormatStdout] @@ -1321,16 +1323,20 @@ added = '3.2' [function.PySys_HasWarnOptions] added = '3.2' + abi_only = true [function.PySys_ResetWarnOptions] added = '3.2' [function.PySys_SetArgv] added = '3.2' + abi_only = true [function.PySys_SetArgvEx] added = '3.2' + abi_only = true [function.PySys_SetObject] added = '3.2' [function.PySys_SetPath] added = '3.2' + abi_only = true [function.PySys_WriteStderr] added = '3.2' [function.PySys_WriteStdout] @@ -1658,8 +1664,10 @@ added = '3.2' [function.Py_SetProgramName] added = '3.2' + abi_only = true [function.Py_SetPythonHome] added = '3.2' + abi_only = true [function.Py_SetRecursionLimit] added = '3.2' [function.Py_VaBuildValue] @@ -1990,6 +1998,7 @@ added = '3.7' # (and 3.6.1 and 3.5.3) [function.PySys_AddXOption] added = '3.7' # (and 3.6.1 and 3.5.3) + abi_only = true [function.PySys_GetXOptions] added = '3.7' # (and 3.6.1 and 3.5.3) [function.PyUnicode_AsUCS4] @@ -2020,6 +2029,7 @@ added = '3.7' # (and 3.6.1 and 3.5.3) [function.Py_SetPath] added = '3.7' # (and 3.6.1 and 3.5.3) + abi_only = true [function.PyErr_SetExcFromWindowsErr] added = '3.7' # (and 3.6.1 and 3.5.3) ifdef = 'MS_WINDOWS' |