Skip to content

Commit a6c5033

Browse files
authored
Download uv from releases.astral.sh instead of GitHub releases (#524)
Since Astral now mirror uv releases to `releases.astral.sh`, which is backed by Cloudflare R2 / CDN, and so is more reliable than GitHub releases. See: astral-sh/uv#18207 (comment) GUS-W-21561072.
1 parent d9baa32 commit a6c5033

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Changed
1111

1212
- Updated uv from 0.10.7 to 0.10.9. ([#523](https://github.com/heroku/buildpacks-python/pull/523))
13+
- Switched to downloading uv from `releases.astral.sh` instead of GitHub releases. ([#524](https://github.com/heroku/buildpacks-python/pull/524))
1314

1415
## [6.0.1] - 2026-03-03
1516

src/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,15 +516,15 @@ fn on_uv_layer_error(error: UvLayerError) {
516516
DownloadUnpackArchiveError::Request(ureq_error) => log_error(
517517
"Unable to download uv",
518518
formatdoc! {"
519-
An error occurred while downloading uv from GitHub.
519+
An error occurred while downloading uv from Astral's website.
520520
521521
In some cases, this happens due to a temporary issue with
522-
the network connection or GitHub's API/CDN.
522+
the network connection or Astral's CDN, Cloudflare.
523523
524524
Try building again to see if the error resolves itself.
525525
526-
If that doesn't help, check the status of GitHub here:
527-
https://www.githubstatus.com
526+
If that doesn't help, check the status of Cloudflare here:
527+
https://www.cloudflarestatus.com
528528
529529
Details: {ureq_error}
530530
"},

src/layers/uv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub(crate) fn install_uv(
8787
// 1. It's currently slower than the glibc variant: https://github.com/astral-sh/uv/issues/10610
8888
// 2. At the moment this buildpack only supports Ubuntu anyway (we only compile Python runtimes for Ubuntu).
8989
let archive_url = format!(
90-
"https://github.com/astral-sh/uv/releases/download/{UV_VERSION}/uv-{ARCH}-unknown-linux-gnu.tar.gz"
90+
"https://releases.astral.sh/github/uv/releases/download/{UV_VERSION}/uv-{ARCH}-unknown-linux-gnu.tar.gz"
9191
);
9292
let layer_bin_dir = layer.path().join("bin");
9393
utils::download_and_unpack_nested_gzip_archive(&archive_url, &layer_bin_dir, 1)

0 commit comments

Comments
 (0)