[Python-checkins] gh-44123: Add note on relative path for os.exec* (GH-93826)

zooba webhook-mailer at python.org
Mon Apr 24 09:52:39 EDT 2023


https://github.com/python/cpython/commit/59c522f9650c22dc986debce483b83a4ffc6dc0d
commit: 59c522f9650c22dc986debce483b83a4ffc6dc0d
branch: main
author: Stanley <46876382+slateny at users.noreply.github.com>
committer: zooba <steve.dower at microsoft.com>
date: 2023-04-24T14:52:31+01:00
summary:

gh-44123: Add note on relative path for os.exec* (GH-93826)

Co-authored-by: Steve Dower <steve.dower at python.org>

files:
M Doc/library/os.rst

diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 7bb501c59468..50e951c631fa 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -3919,7 +3919,8 @@ to be ignored.
    the :envvar:`PATH` variable. The other variants, :func:`execl`, :func:`execle`,
    :func:`execv`, and :func:`execve`, will not use the :envvar:`PATH` variable to
    locate the executable; *path* must contain an appropriate absolute or relative
-   path.
+   path. Relative paths must include at least one slash, even on Windows, as
+   plain names will not be resolved.
 
    For :func:`execle`, :func:`execlpe`, :func:`execve`, and :func:`execvpe` (note
    that these all end in "e"), the *env* parameter must be a mapping which is



More information about the Python-checkins mailing list