diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/init.rst | 19 | ||||
-rw-r--r-- | Doc/c-api/sys.rst | 3 | ||||
-rw-r--r-- | Doc/whatsnew/3.13.rst | 14 |
3 files changed, 36 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index dfb381953dd..1dab0af2659 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -429,6 +429,9 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :data:`sys.executable` instead. + .. c:function:: wchar_t* Py_GetPrefix() @@ -448,6 +451,9 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :data:`sys.prefix` instead. + .. c:function:: wchar_t* Py_GetExecPrefix() @@ -489,6 +495,9 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :data:`sys.exec_prefix` instead. + .. c:function:: wchar_t* Py_GetProgramFullPath() @@ -507,6 +516,9 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :data:`sys.executable` instead. + .. c:function:: wchar_t* Py_GetPath() @@ -532,6 +544,9 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :data:`sys.path` instead. + .. c:function:: const char* Py_GetVersion() @@ -615,6 +630,10 @@ Process-wide parameters .. versionchanged:: 3.10 It now returns ``NULL`` if called before :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment + variable instead. + .. _threads: diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst index ad6005b7c7a..c4077b2a562 100644 --- a/Doc/c-api/sys.rst +++ b/Doc/c-api/sys.rst @@ -237,6 +237,9 @@ accessible to C code. They all work with the current interpreter thread's Reset :data:`sys.warnoptions` to an empty list. This function may be called prior to :c:func:`Py_Initialize`. + .. deprecated-removed:: 3.13 3.15 + Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead. + .. c:function:: void PySys_WriteStdout(const char *format, ...) Write the output string described by *format* to :data:`sys.stdout`. No diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index f3ded6ae34e..8427bda514b 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -357,6 +357,20 @@ Deprecated ``PY_UNICODE_TYPE`` are just aliases to ``wchar_t``. (Contributed by Victor Stinner in :gh:`105156`.) +* Deprecate old Python initialization functions: + + * :c:func:`PySys_ResetWarnOptions`: + clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead. + * :c:func:`Py_GetExecPrefix`: get :data:`sys.exec_prefix` instead. + * :c:func:`Py_GetPath`: get :data:`sys.path` instead. + * :c:func:`Py_GetPrefix`: get :data:`sys.prefix` instead. + * :c:func:`Py_GetProgramFullPath`: get :data:`sys.executable` instead. + * :c:func:`Py_GetProgramName`: get :data:`sys.executable` instead. + * :c:func:`Py_GetPythonHome`: get :c:member:`PyConfig.home` or + :envvar:`PYTHONHOME` environment variable instead. + + (Contributed by Victor Stinner in :gh:`105145`.) + Removed ------- |