From 2ddb3c97183ecf976c7d6f163715f502b5c82618 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Wed, 1 Apr 2026 23:16:32 +0900 Subject: [PATCH 1/3] fix(uv): drop powerpc64 support to fix latest version downloads 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. --- CHANGELOG.md | 17 +++++++++++++++++ MODULE.bazel | 11 ++--------- python/uv/private/uv.bzl | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e7c152acd..d60e1931bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,10 @@ Other changes: Fixes ([#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` + file. If you have redirects or blocking rules as part of your downloader setup, + you may need to adjust them. What is more, the default uv version has been bumped + `0.11.2`. {#v0-0-0-fixed} ### Fixed @@ -97,6 +101,19 @@ Other changes: * (bootstrap) Fixed incorrect runfiles path construction in bootstrap scripts when binary is defined in another bazel module ([#3563](https://github.com/bazel-contrib/rules_python/issues/3563)). +* (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 + bring it back via the `uv.default` API. Like: + ``` + uv.default( + compatible_with = [ + "@platforms//os:linux", + "@platforms//cpu:ppc", + ], + platform = "powerpc64-unknown-linux-gnu", + ) + ``` + Fixes [#3676](https://github.com/bazel-contrib/rules_python/issues/3676). {#v0-0-0-added} ### Added diff --git a/MODULE.bazel b/MODULE.bazel index 7cfe4ee576..28ce9fe7d4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -385,7 +385,7 @@ uv = use_extension("//python/uv:uv.bzl", "uv") uv.default( base_url = "https://github.com/astral-sh/uv/releases/download", manifest_filename = "dist-manifest.json", - version = "0.6.3", + version = "0.11.2", ) uv.default( compatible_with = [ @@ -401,13 +401,6 @@ uv.default( ], platform = "aarch64-unknown-linux-gnu", ) -uv.default( - compatible_with = [ - "@platforms//os:linux", - "@platforms//cpu:ppc", - ], - platform = "powerpc64-unknown-linux-gnu", -) uv.default( compatible_with = [ "@platforms//os:linux", @@ -460,7 +453,7 @@ uv_dev = use_extension( dev_dependency = True, ) uv_dev.configure( - version = "0.6.2", + version = "0.11.2", ) # Temporarily comment out these flag aliases because they break Bazel 9 diff --git a/python/uv/private/uv.bzl b/python/uv/private/uv.bzl index fe0911e3ea..d9302c71ae 100644 --- a/python/uv/private/uv.bzl +++ b/python/uv/private/uv.bzl @@ -420,6 +420,17 @@ def _get_tool_urls_from_dist_manifest(module_ctx, *, base_url, manifest_filename "uv-aarch64-apple-darwin.tar.gz.sha256" "... ] + hosting + order + 0 "simple" + 1 "github" + github + artifact_base_url "https://github.com" + artifact_download_path "/astral-sh/uv/releases/download/0.11.2" + owner "astral-sh" + repo "uv" + simple + download_url "https://releases.astral.sh/github/uv/releases/download/0.11.2" artifacts uv-aarch64-apple-darwin.tar.gz name "uv-aarch64-apple-darwin.tar.gz" @@ -460,6 +471,14 @@ def _get_tool_urls_from_dist_manifest(module_ctx, *, base_url, manifest_filename fail(result) dist_manifest = json.decode(module_ctx.read(dist_manifest)) + base_url = ( + dist_manifest + .get("releases", [{}])[0] + .get("hosting", {}) + .get("simple", {}) + .get("download_url", base_url) + ) + artifacts = dist_manifest["artifacts"] tool_sources = {} downloads = {} From 0daf2deef8ebcdc81aab18fba6d36aa5b7acb39b Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:28:28 +0900 Subject: [PATCH 2/3] chore: bump mypy to test with Python 3.10 onwards --- .github/workflows/mypy.yaml | 4 ++-- CHANGELOG.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index a22119e118..ae4d867845 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -22,10 +22,10 @@ jobs: - uses: jpetrucciani/mypy-check@master with: requirements: 1.6.0 - python_version: 3.9 + python_version: 3.10 path: 'python/runfiles' - uses: jpetrucciani/mypy-check@master with: requirements: 1.6.0 - python_version: 3.9 + python_version: 3.10 path: 'tests/runfiles' diff --git a/CHANGELOG.md b/CHANGELOG.md index d60e1931bb..39f0223e4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,6 +85,7 @@ Other changes: file. If you have redirects or blocking rules as part of your downloader setup, you may need to adjust them. What is more, the default uv version has been bumped `0.11.2`. +* (runfiles): We are stopping the type annotation testing with `mypy` for Python 3.9. {#v0-0-0-fixed} ### Fixed From 518aadcaacafe94563cdd820fc6e5a2dc422c085 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius <240938+aignas@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:34:57 +0900 Subject: [PATCH 3/3] cleanup the mypy-check --- .github/workflows/mypy.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml index ae4d867845..e38e5c71ba 100644 --- a/.github/workflows/mypy.yaml +++ b/.github/workflows/mypy.yaml @@ -21,11 +21,7 @@ jobs: - uses: actions/checkout@v6 - uses: jpetrucciani/mypy-check@master with: - requirements: 1.6.0 - python_version: 3.10 path: 'python/runfiles' - uses: jpetrucciani/mypy-check@master with: - requirements: 1.6.0 - python_version: 3.10 path: 'tests/runfiles'