diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-24 15:44:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 15:44:15 (GMT) |
commit | 1ce152a42eaa917d7763bce93f1e1ca72530d7ca (patch) | |
tree | e6a43ecd6f9d776571f96544f763b016cf8047a9 /Doc/c-api | |
parent | b0e1ae5f5430433766e023c1a6936aeba0f2b84e (diff) | |
download | cpython-1ce152a42eaa917d7763bce93f1e1ca72530d7ca.zip cpython-1ce152a42eaa917d7763bce93f1e1ca72530d7ca.tar.gz cpython-1ce152a42eaa917d7763bce93f1e1ca72530d7ca.tar.bz2 |
bpo-38234: Py_SetPath() uses the program full path (GH-16357)
Py_SetPath() now sets sys.executable to the program full path
(Py_GetProgramFullPath()), rather than to the program name
(Py_GetProgramName()).
Fix also memory leaks in pathconfig_set_from_config().
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init.rst | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 0f8ff3b..0b7a84d 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -472,8 +472,8 @@ Process-wide parameters dependent delimiter character, which is ``':'`` on Unix and Mac OS X, ``';'`` on Windows. - This also causes :data:`sys.executable` to be set only to the raw program - name (see :c:func:`Py_SetProgramName`) and for :data:`sys.prefix` and + This also causes :data:`sys.executable` to be set to the program + full path (see :c:func:`Py_GetProgramFullPath`) and for :data:`sys.prefix` and :data:`sys.exec_prefix` to be empty. It is up to the caller to modify these if required after calling :c:func:`Py_Initialize`. @@ -483,6 +483,10 @@ Process-wide parameters The path argument is copied internally, so the caller may free it after the call completes. + .. versionchanged:: 3.8 + The program full path is now used for :data:`sys.executable`, instead + of the program name. + .. c:function:: const char* Py_GetVersion() |