Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
01c152e
GH-75586 - Fix case where PATHEXT isn't applied to items in PATH (Win…
csm10495 Apr 2, 2023
0d4cd7b
PR updates
csm10495 Apr 2, 2023
5fac84a
Add tests
csm10495 Apr 2, 2023
fa145da
PR updates
csm10495 Apr 2, 2023
84a7976
line len fix
csm10495 Apr 2, 2023
63a06c4
📜🤖 Added by blurb_it.
blurb-it[bot] Apr 2, 2023
7686a23
Add changelog entry
csm10495 Apr 2, 2023
381e4fe
Double backticks
csm10495 Apr 2, 2023
e7c0b58
Update Lib/shutil.py
csm10495 Apr 2, 2023
26e3b15
PR updates
csm10495 Apr 2, 2023
6272b62
pep8 fix
csm10495 Apr 2, 2023
b6d29c8
Update Lib/test/test_shutil.py
csm10495 Apr 2, 2023
1096cb7
Update Lib/test/test_shutil.py
csm10495 Apr 2, 2023
92955d0
Update Lib/shutil.py
csm10495 Apr 3, 2023
616df6c
docs updates
csm10495 Apr 3, 2023
255e4ff
Add another test
csm10495 Apr 3, 2023
f52868d
Update Doc/library/shutil.rst
csm10495 Apr 3, 2023
6e9269f
rewording
csm10495 Apr 3, 2023
a6b7eab
Rewording
csm10495 Apr 3, 2023
7480daa
Reword whats new
csm10495 Apr 3, 2023
a48260c
Clarify
csm10495 Apr 3, 2023
6bb6f6c
Clarify how to not search cwd for exes
csm10495 Apr 3, 2023
b5f3eba
Doc updates
csm10495 Apr 3, 2023
3bf4b8d
Update Doc/library/shutil.rst
csm10495 Apr 3, 2023
be73608
Update 2023-04-02-22-04-26.gh-issue-75586.526iJm.rst
csm10495 Apr 3, 2023
0169ba9
Update Doc/library/shutil.rst
csm10495 Apr 4, 2023
499d2de
Update Lib/shutil.py
csm10495 Apr 4, 2023
3ead780
Add test for behavior
csm10495 Apr 4, 2023
f9267da
kick ci
csm10495 Apr 4, 2023
d1e68ff
Mention cwd first behavior
csm10495 Apr 4, 2023
9badf8c
Wording
csm10495 Apr 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Doc updates
  • Loading branch information
csm10495 committed Apr 3, 2023
commit b5f3eba5db7a4911d74292125122cd2d97074da3
15 changes: 7 additions & 8 deletions Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,11 @@ Directory and files operations
When no *path* is specified, the results of :func:`os.environ` are used,
returning either the "PATH" value or a fallback of :attr:`os.defpath`.

On Windows, the current directory is prepended to the *path* if
the *mode* does not include ``os.X_OK``. When the *mode* does include
``os.X_OK``, the Windows API ``NeedCurrentDirectoryForExePathW`` will be
consulted to determine if the current directory should be prepended to
*path*. To avoid consulting the current working directory for executables,
and thereby, match the behavior of non-Windows shells: set the environment
On Windows, the current directory is prepended to the *path* if *mode* does
not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the
Windows API ``NeedCurrentDirectoryForExePathW`` will be consulted to
determine if the current directory should be prepended to *path*. To avoid
consulting the current working directory for executables: set the environment
variable ``NoDefaultCurrentDirectoryInExePath``.

Also on Windows, the ``PATHEXT`` variable is used to resolve commands
Expand All @@ -450,8 +449,8 @@ Directory and files operations
>>> shutil.which("python")
'C:\\Python33\\python.EXE'

Similar ``PATHEXT`` logic is also applied when a full path to a *cmd* is
given, containing a directory component::
This is also applied when *cmd* is a path that contains a directory
component::

>> shutil.which("C:\\Python33\\python")
'C:\\Python33\\python.EXE'
Expand Down