Skip to content

fix(bzlmod): support Python versions not in MINOR_MAPPING - #4366

Open
rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:fix_minor_mapping_python_versions
Open

rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:fix_minor_mapping_python_versions

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Configuring a Python patch version newer than the built-in
MINOR_MAPPING failed in the python and pip Bzlmod extensions.
Manifest files loaded via add_runtime_manifest_files omitted the
release tag from default download URLs, single_version_override did
not require sha256 and urls when introducing a new version, and
pip.parse failed to match host interpreters when toolchain and pip
version granularities differed (such as X.Y vs. X.Y.Z or versions
inferred from pyproject.toml).

Update the python extension to include the release build version in
default manifest URLs, require sha256 and urls for new
single-version overrides, and verify requested toolchains exist in
tool_versions. Update pip.parse to resolve host interpreters across
exact, full, and major.minor version names and key index URL settings
by the resolved Python version.

Fixes #4358

Configuring a Python patch version newer than the built-in
`MINOR_MAPPING` failed in the `python` and `pip` Bzlmod extensions.
Manifest files loaded via `add_runtime_manifest_files` omitted the
release tag from default download URLs, `single_version_override` did
not require `sha256` and `urls` when introducing a new version, and
`pip.parse` failed to match host interpreters when toolchain and pip
version granularities differed (such as `X.Y` vs. `X.Y.Z` or versions
inferred from `pyproject.toml`).

Update the `python` extension to include the release build version in
default manifest URLs, require `sha256` and `urls` for new
single-version overrides, and verify requested toolchains exist in
`tool_versions`. Update `pip.parse` to resolve host interpreters across
exact, full, and `major.minor` version names and key index URL settings
by the resolved Python version.

Fixes bazel-contrib#4358
@rickeylev
rickeylev requested a review from aignas as a code owner October 27, 2026 16:39
@rickeylev

Copy link
Copy Markdown
Collaborator Author

AI Disclosure

  • Oversight level: semi-autonomous (human-directed diagnosis, fix, and diff review).
  • Review comment handling: Both the human author and AI agent monitor and respond to review comments with human oversight.

This is an automatically generated agent comment.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Increase the patch version of all Python releases

1 participant