[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Eryk Sun
Eryk Sun added the comment: Michael, thank you for the PR, but please associate it with the existing issue bpo-24505. -- nosy: +eryksun resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> shutil.which wrong result on Windows versions: -Pyt

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
Michael Hirsch, Ph.D. added the comment: Correction: Example: on Windows if ./foo.exe exists, then shutil.which('./foo') returns None. -- ___ Python tracker ___

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
Change by Michael Hirsch, Ph.D. : -- keywords: +patch pull_requests: +25053 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26458 ___ Python tracker __

[issue44270] shutil.which: does not find path/cmd.ext where ext is not given

2021-05-30 Thread Michael Hirsch, Ph.D.
New submission from Michael Hirsch, Ph.D. : The early short-circuit logic in shutil.which() when cmd includes a directory component incorrectly gives None on Windows if the correct filename suffix was not also given. Example: on Windows if ./foo.exe exists, then shutil.which('./foo.exe') retu