…h() on Windows Name without a PATHEXT extension is only searched if the mode does not include X_OK.
Closed
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
Nov 22, 2024…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
changed the title
gh-127001: Fix conflict with extensionless files in shutil.which() on Windows
gh-127001: Fix PATHEXT issues in shutil.which() on Windows
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request
Nov 22, 2024…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 <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request
Nov 22, 2024…-127035) (GH-127156) * 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 added a commit that referenced this pull request
Nov 22, 2024…-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 8899e85 )
Merged
wpbonelli pushed a commit to modflowpy/flopy that referenced this pull request
Jan 10, 2025…Windows (#2408) This PR aims to address a behavior change in shutil.which (in Windows) introduced in python/cpython#127035. For more context, in test_run_model_exe_rel_path, the mf6 executable is copied to a relative path, ../bin/mf6 (without extension). Within the test, shutil.which is used to locate the executable path. However, with the new changes in shutil.which, by default, it would only search for the path with an extension in PATHEXT, excluding paths without extension.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request
Jan 12, 2025…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.").
Merged
3 tasks