Skip to content

fix(uv): drop powerpc64 support to fix latest version downloads#3678

Merged
aignas merged 3 commits intobazel-contrib:mainfrom
aignas:aignas.fix.bump-uv
Apr 3, 2026
Merged

fix(uv): drop powerpc64 support to fix latest version downloads#3678
aignas merged 3 commits intobazel-contrib:mainfrom
aignas:aignas.fix.bump-uv

Conversation

@aignas
Copy link
Copy Markdown
Collaborator

@aignas aignas commented Apr 1, 2026

Before this PR we would index all of the available binaries and it would
fail in the case if the sha256 file is not found. It seems that this
is the case for the powerpc64. In order to work this around, we just
drop support for that particular platform.

Whilst at it, bump the uv version.

Fixes #3676.

@aignas aignas requested a review from rickeylev as a code owner April 1, 2026 14:18
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the default uv version to 0.11.2 and modifies the toolchain to extract download URLs directly from the dist-manifest.json file. It also drops default support for the powerpc64 platform to resolve compatibility issues with newer uv versions. Review feedback highlights several typos and grammatical errors in the CHANGELOG.md and identifies a potential IndexError in the manifest parsing logic within python/uv/private/uv.bzl that should be handled more robustly.

this particular case.
([#3260](https://github.com/bazel-contrib/rules_python/issues/3260) and
[#2632](https://github.com/bazel-contrib/rules_python/issues/2632))
* (uv) We will now use the download URL specified in the `uv`'s `dist_manifest.json`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The filename mentioned here is dist_manifest.json, but the actual filename used in the repository and by the uv project is dist-manifest.json (with a hyphen).

Suggested change
* (uv) We will now use the download URL specified in the `uv`'s `dist_manifest.json`
* (uv) We will now use the download URL specified in the `uv`'s `dist-manifest.json`

Comment on lines +80 to +81
you may need to adjust them. What is more, the default uv version has been bumped
`0.11.2`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a missing word "to" before the version number.

Suggested change
you may need to adjust them. What is more, the default uv version has been bumped
`0.11.2`.
you may need to adjust them. What is more, the default uv version has been bumped
to `0.11.2`.

Comment on lines +98 to +99
* (uv) Downloads for versions `>=0.10` work again. In order to fix this we had
drop support for `powerpc64` platform. People interested in the platform can
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a missing word "to" before "drop".

Suggested change
* (uv) Downloads for versions `>=0.10` work again. In order to fix this we had
drop support for `powerpc64` platform. People interested in the platform can
* (uv) Downloads for versions `>=0.10` work again. In order to fix this we had to
drop support for `powerpc64` platform. People interested in the platform can

Comment on lines +474 to +480
base_url = (
dist_manifest
.get("releases", [{}])[0]
.get("hosting", {})
.get("simple", {})
.get("download_url", base_url)
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation will raise an IndexError if the releases key exists in the manifest but is an empty list (e.g., {"releases": []}). It is safer to check if the list is non-empty before attempting to access the first element.

    releases = dist_manifest.get("releases")
    if releases:
        base_url = releases[0].get("hosting", {}).get("simple", {}).get("download_url", base_url)

aignas added 3 commits April 2, 2026 16:42
Before this PR we would index all of the available binaries and it would
fail in the case if the `sha256` file is not found. It seems that this
is the case for the `powerpc64`. In order to work this around, we just
drop support for that particular platform.

Whilst at it, bump the uv version.

Fixes bazel-contrib#3676.
@aignas aignas force-pushed the aignas.fix.bump-uv branch from 4a84f98 to 518aadc Compare April 2, 2026 07:42
@aignas aignas enabled auto-merge April 3, 2026 00:05
@aignas aignas disabled auto-merge April 3, 2026 04:09
@aignas aignas merged commit 782ae91 into bazel-contrib:main Apr 3, 2026
3 of 4 checks passed
@aignas aignas deleted the aignas.fix.bump-uv branch April 3, 2026 04:09
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.

rules_python is not working with uv 0.10+

2 participants