From cb093394b3adf152f6959d00251f8690ae5c9d4c Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Fri, 20 Mar 2026 11:26:07 -0500 Subject: [PATCH] Drop requirement on `which` in Python system tests (#18588) --- scripts/check_system_python.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/check_system_python.py b/scripts/check_system_python.py index 3518d1578..5fe740f21 100755 --- a/scripts/check_system_python.py +++ b/scripts/check_system_python.py @@ -152,13 +152,9 @@ if __name__ == "__main__": if code.returncode != 0: raise Exception("The package `pylint` isn't installed (but should be).") - # TODO(charlie): Windows is failing to find the `pylint` binary, despite - # confirmation that it's being written to the intended location. - if os.name != "nt": - logging.info("Checking that `pylint` is in the path.") - code = subprocess.run(["which", "pylint"], cwd=temp_dir) - if code.returncode != 0: - raise Exception("The package `pylint` isn't in the path.") + logging.info("Checking that `pylint` is in the path.") + if shutil.which("pylint") is None: + raise Exception("The package `pylint` isn't in the path.") # Uninstall the package (`pylint`). logging.info("Uninstalling the package `pylint`.")