]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035) (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 22 Nov 2024 16:33:50 +0000 (18:33 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 16:33:50 +0000 (16:33 +0000)
commit29648980d440e70ade4e0975b8d6aa83214866ed
treef90ac9c8fb11ffe06721f3e2db966683933f1e36
parent32bc8e83db3bcca7138dbd23e7925c0a5217c0a0
[3.12] gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035) (GH-127158)

* Name without a PATHEXT extension is only searched if the mode does not
  include X_OK.
* Support multi-component PATHEXT extensions (e.g. ".foo.bar").
* Support files without extensions in PATHEXT contains dot-only extension
  (".", "..", etc).
* Support PATHEXT extensions that end with a dot (e.g. ".foo.").
(cherry picked from commit 8899e85de100557899da05f0b37867a371a73800)
Doc/library/shutil.rst
Lib/shutil.py
Lib/test/test_shutil.py
Misc/NEWS.d/next/Library/2024-11-22-10-42-34.gh-issue-127035.UnbDlr.rst [new file with mode: 0644]