fix(pypi): skip a pip.parse version with no interpreter for the host - #4184
Merged
rickeylev merged 2 commits intoSep 27, 2026
Merged
Conversation
A pip.parse whose python_version has a toolchain but no interpreter that runs on the host fails the whole pip extension. That takes down every other hub with it, including the root module's own, even when nothing in the build uses the failing one. This shows up on Windows ARM64. grpc, protoc-gen-validate and rules_fuzzing each call pip.parse for Python 3.9 and 3.10, and there is no CPython 3.9 or 3.10 build for aarch64-pc-windows-msvc, so evaluating the extension fails with "Unable to find interpreter for pip hub 'grpc_python_dependencies' for python_version=3.9" before any of it is needed. A version missing from minor_mapping is already skipped with an info message, leaving the hub's select to fail later only if that version is actually used. Treat a version with no host interpreter the same way.
Rename the news fragment to match the PR number, use Sphinx MyST {obj} cross-references, avoid internal minor_mapping terminology, and append the issue link.
rickeylev
approved these changes
Sep 27, 2026
Collaborator
|
Thanks for the fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows ARM64, evaluating the
pipextension fails as soon as anymodule in the graph calls
pip.parsefor Python 3.9 or 3.10:There is no CPython 3.9 or 3.10 build for
aarch64-pc-windows-msvcin theruntime manifest, so those toolchains have no host interpreter there.
_pip_parsealready handles a close relative of this: a version missingfrom
minor_mappingis skipped with an info message, and the hub'sselect fails later only if that version is actually used. This treats a
version with no host interpreter the same way, right after that check.
The
python_X_Y_hostname is built in one small helper, so the new checkand
_detect_interpreterlook at the same thing.To check it, I ran
bazel query @bazel_pip_dev_deps//:allin a plaincheckout of Bazel master (rules_python 1.9.2, grpc 1.76.0) with and
without this change back-ported to 1.9.2, on
windows-11-armandubuntu-latest:https://github.com/zakinko/NetBSD-i386/actions/runs/36248007899
With
RULES_PYTHON_REPO_DEBUG_VERBOSITY=INFOthe Windows run prints thenew message once for each of the six hub and version pairs, next to the
existing "no registered toolchain" one for rules_fuzzing's 3.8.
The new test in
hub_builder_tests.bzlfails without the change with thesame error, and
//tests/pypi/...passes with it (254 tests, on macOS).