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-132415: Use shutil.which() in missing_compiler_executable()#132906

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
vstinner merged 1 commit intopython:mainfromvstinner:which
Apr 25, 2025

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedApr 25, 2025
edited by bedevere-appbot
Loading

Replace deprecated distutils.spawn.find_executable() with shutil.which() in missing_compiler_executable() of test.support.

Replace deprecated distutils.spawn.find_executable() withshutil.which() in missing_compiler_executable() of test.support.
@vstinner
Copy link
MemberAuthor

test_peg_generator fails withDeprecationWarning.

Example:https://buildbot.python.org/#/builders/64/builds/9220

ERROR: test_c_parser (test.test_peg_generator.test_c_parser.TestCParser.test_c_parser)----------------------------------------------------------------------Traceback (most recent call last):  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/test_peg_generator/test_c_parser.py", line 113, in setUp    cmd = support.missing_compiler_executable()  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/support/__init__.py", line 1963, in missing_compiler_executable    if spawn.find_executable(cmd[0]) is None:       ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/build/test_python_626928æ/tempcwd/venv/lib/python3.14/site-packages/setuptools/_distutils/spawn.py", line 104, in find_executable    warnings.warn(    ~~~~~~~~~~~~~^        'Use shutil.which instead of find_executable', DeprecationWarning, stacklevel=2        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    )    ^DeprecationWarning: Use shutil.which instead of find_executable

@vstinnervstinner merged commitde6482e intopython:mainApr 25, 2025
43 of 44 checks passed
@vstinnervstinner deleted the which branchApril 25, 2025 09:50
@miss-islington-app
Copy link

Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestApr 25, 2025
…ythonGH-132906)Replace deprecated distutils.spawn.find_executable() withshutil.which() in missing_compiler_executable() of test.support.(cherry picked from commitde6482e)Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-app
Copy link

GH-132916 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelApr 25, 2025
vstinner added a commit that referenced this pull requestApr 25, 2025
…GH-132906) (#132916)gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906)Replace deprecated distutils.spawn.find_executable() withshutil.which() in missing_compiler_executable() of test.support.(cherry picked from commitde6482e)Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@vstinner

[8]ページ先頭

©2009-2025 Movatter.jp