summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-01 07:14:02 (GMT)
committerGitHub <noreply@github.com>2023-06-01 07:14:02 (GMT)
commit424049cc1117d66dfa86196ee5f694c15b46ac6c (patch)
tree92dbbd5558deb687efb53e653d667ba6af608930 /Doc/whatsnew
parent8ed705c083e8e5ff37649d998a8b1524ec921519 (diff)
downloadcpython-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 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.13.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst
index e263d0b..cdc48a5 100644
--- a/Doc/whatsnew/3.13.rst
+++ b/Doc/whatsnew/3.13.rst
@@ -375,3 +375,23 @@ Removed
* ``PyEval_CallMethod()``: use :c:func:`PyObject_CallMethod` instead.
(Contributed by Victor Stinner in :gh:`105107`.)
+
+* Remove the following old functions to configure the Python initialization,
+ deprecated in Python 3.11:
+
+ * ``PySys_AddWarnOptionUnicode()``: use :c:member:`PyConfig.warnoptions` instead.
+ * ``PySys_AddWarnOption()``: use :c:member:`PyConfig.warnoptions` instead.
+ * ``PySys_AddXOption()``: use :c:member:`PyConfig.xoptions` instead.
+ * ``PySys_HasWarnOptions()``: use :c:member:`PyConfig.xoptions` instead.
+ * ``PySys_SetArgvEx()``: set :c:member:`PyConfig.argv` instead.
+ * ``PySys_SetArgv()``: set :c:member:`PyConfig.argv` instead.
+ * ``PySys_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead.
+ * ``Py_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead.
+ * ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
+ * ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
+ * ``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding` instead.
+ * ``_Py_SetProgramFullPath()``: set :c:member:`PyConfig.executable` instead.
+
+ Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization
+ Configuration <init-config>` instead (:pep:`587`), added to Python 3.8.
+ (Contributed by Victor Stinner in :gh:`105145`.)