]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 22 Nov 2024 15:52:15 +0000 (17:52 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 15:52:15 +0000 (17:52 +0200)
commit8899e85de100557899da05f0b37867a371a73800
treeb410cfeb9f683b02571c8fa7425e72b38b23e350
parent615abb99a4538520f380ab26a42f1506e08ffd09
gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035)

* 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.").
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]