Skip to content

[3.13] gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035) #127156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 22, 2024

  • 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 8899e85)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com


📚 Documentation preview 📚: https://cpython-previews--127156.org.readthedocs.build/

…honGH-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.").
(cherry picked from commit 8899e85)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) November 22, 2024 15:57
@serhiy-storchaka serhiy-storchaka merged commit 7f22b87 into python:3.13 Nov 22, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants