Skip to content
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

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

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka 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)

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

…ws (pythonGH-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 <[email protected]>
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.

1 participant