]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Oct 2023 15:48:30 +0000 (08:48 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 15:48:30 +0000 (17:48 +0200)
commitb61a4da459b65c7c925d395944aaa9b4be1254a5
tree950e96ac63734931141510988ff75da55041b7f8
parent10af2242f436ba5996c2c866108de803e7f4ca62
[3.12] gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995) (#110202)

gh-109590: Update shutil.which on Windows to prefer a PATHEXT extension on executable files (GH-109995)

The default arguments for shutil.which() request an executable file, but extensionless files are not executable on Windows and should be ignored.
(cherry picked from commit 29b875bb93099171aeb7a60cd18d4e1f4ea3c1db)

Co-authored-by: Charles Machalow <csm10495@gmail.com>
Doc/library/shutil.rst
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2023-09-24-06-04-14.gh-issue-109590.9EMofC.rst [new file with mode: 0644]