Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-75586: Fix case where PATHEXT isn't applied to items in PATH (Windows)#103179

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zooba merged 31 commits intopython:mainfromcsm10495:fix_which_pathext_windows
Apr 4, 2023

Conversation

@csm10495
Copy link
Contributor

GH-75586 - Fix case where PATHEXT isn't applied to items in PATH.

The logic change here makes it so that if the command passed intoshutil.which on windows, it will be verified against how it is passed in and against the various items in PATHEXT.

For example:

shutil.which('C:/windows/system32/cmd')

will now return

'C:/windows/system32/cmd.EXE'

Instead ofNone.

If this looks good, I'd be happy to create a changelog entry, etc. Just feeling the water with this first commit.

@arhadthedevarhadthedev added OS-windows stdlibStandard Library Python modules in the Lib/ directory labelsApr 2, 2023
@arhadthedevarhadthedev changed the titleGH-75586 - Fix case where PATHEXT isn't applied to items in PATH (Win…GH-75586: Fix case where PATHEXT isn't applied to items in PATH (Windows)Apr 2, 2023
@arhadthedevarhadthedev requested a review froma teamApril 2, 2023 03:58
@csm10495
Copy link
ContributorAuthor

@eryksun I think i fixed everything. Check again. Thanks!

csm10495and others added2 commitsApril 2, 2023 15:36
Co-authored-by: Eryk Sun <eryksun@gmail.com>
csm10495and others added2 commitsApril 2, 2023 16:10
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
@eryksuneryksun added the 3.12only security fixes labelApr 2, 2023
@csm10495csm10495 requested a review fromzoobaApril 4, 2023 16:52
csm10495and others added2 commitsApril 4, 2023 13:16
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
@csm10495
Copy link
ContributorAuthor

@zooba updated and added a corresponding test.

@csm10495csm10495 requested a review fromzoobaApril 4, 2023 20:27
@zooba
Copy link
Member

Looks good, and the tests all patch the call to that API so we shouldn't be impacted if the test machine has it configured differently.

Once CI passes, and unless someone else speaks up, I'll merge. Thanks for all your work on this!

csm10495 reacted with heart emoji

@csm10495
Copy link
ContributorAuthor

Got a doctest failure... The error is odd.. maybe its transient? I'll push an empty commit to see if it helps.

Testing of doctests in the sources finished, look at the results in build/doctest/output.txt.python: ./Include/internal/pycore_typeobject.h:75: _PyType_GetModuleState: Assertion `et->ht_module' failed.Aborted (core dumped)make[1]: *** [Makefile:49: build] Error 134make[1]: Leaving directory '/home/runner/work/cpython/cpython/Doc'Testing of doctests in the sources finished, look at the results in build/doctest/output.txtmake: *** [Makefile:127: doctest] Error 1make: Leaving directory '/home/runner/work/cpython/cpython/Doc'Error: Process completed with exit code 2.

@csm10495
Copy link
ContributorAuthor

@eryksun added. Thanks.

Copy link
Contributor

@eryksuneryksun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM. Thank you, Charles.

csm10495 reacted with heart emoji
@zoobazooba merged commit935aa45 intopython:mainApr 4, 2023
gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull requestApr 8, 2023
warsaw pushed a commit to warsaw/cpython that referenced this pull requestApr 11, 2023
@vstinner
Copy link
Member

This change introduced a regression:#127001.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@eryksuneryksuneryksun approved these changes

@zoobazoobaAwaiting requested review from zooba

Assignees

No one assigned

Labels

3.12only security fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directory

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@csm10495@eryksun@zooba@vstinner@arhadthedev@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp