https://github.com/python/cpython/commit/de6482eda3a46cc9c9a03fb9ba57295ab99b4722 commit: de6482eda3a46cc9c9a03fb9ba57295ab99b4722 branch: main author: Victor Stinner <vstin...@python.org> committer: vstinner <vstin...@python.org> date: 2025-04-25T11:50:55+02:00 summary:
gh-132415: Use shutil.which() in missing_compiler_executable() (#132906) Replace deprecated distutils.spawn.find_executable() with shutil.which() in missing_compiler_executable() of test.support. files: M Lib/test/support/__init__.py diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 71820a20d50e6c..146cbaaf4cb854 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1940,8 +1940,9 @@ def missing_compiler_executable(cmd_names=[]): missing. """ - from setuptools._distutils import ccompiler, sysconfig, spawn + from setuptools._distutils import ccompiler, sysconfig from setuptools import errors + import shutil compiler = ccompiler.new_compiler() sysconfig.customize_compiler(compiler) @@ -1960,7 +1961,7 @@ def missing_compiler_executable(cmd_names=[]): "the '%s' executable is not configured" % name elif not cmd: continue - if spawn.find_executable(cmd[0]) is None: + if shutil.which(cmd[0]) is None: return cmd[0] _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com