diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-01 12:06:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 12:06:32 (GMT) |
commit | c67121ac6bf8ee36d79de92ef68fc3fde178d2a3 (patch) | |
tree | dc23a71f3b65e9dc384d85992a9f73c46c0f6af3 /Doc/c-api/init.rst | |
parent | ec0082ca460f6b5eaf987536d28d6bc252322307 (diff) | |
download | cpython-c67121ac6bf8ee36d79de92ef68fc3fde178d2a3.zip cpython-c67121ac6bf8ee36d79de92ef68fc3fde178d2a3.tar.gz cpython-c67121ac6bf8ee36d79de92ef68fc3fde178d2a3.tar.bz2 |
gh-105145: Deprecate Py_GetPath() function (#105179)
Deprecate old Python initialization functions:
* PySys_ResetWarnOptions()
* Py_GetExecPrefix()
* Py_GetPath()
* Py_GetPrefix()
* Py_GetProgramFullPath()
* Py_GetProgramName()
* Py_GetPythonHome()
_tkinter.c uses sys.executable instead of Py_GetProgramName()
and uses sys.prefix instead of Py_GetPrefix().
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r-- | Doc/c-api/init.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index dfb3819..1dab0af 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: |