Skip to content

Commit

Permalink
Make fetch python downloads deterministic (#11572)
Browse files Browse the repository at this point in the history
Closes #11549
  • Loading branch information
j178 authored Feb 17, 2025
1 parent 248da23 commit 0498b9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/uv-python/download-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"minor": 14,
"patch": 0,
"prerelease": "a5",
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20250212/cpython-3.14.0a5%2B20250212-i686-pc-windows-msvc-shared-install_only_stripped.tar.gz",
"url": "https://github.com/astral-sh/python-build-standalone/releases/download/20250212/cpython-3.14.0a5%2B20250212-i686-pc-windows-msvc-install_only_stripped.tar.gz",
"sha256": "5851a9e6a6afa698fa3ee5b678dff96e612f47e5e2c2f0c032f7c48d42f6a1ac",
"variant": null
},
Expand Down
2 changes: 2 additions & 0 deletions crates/uv-python/fetch-download-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ async def _fetch_downloads(self, pages: int = 100) -> list[PythonDownload]:
if not rows:
break
for row in rows:
# Sort the assets to ensure deterministic results
row["assets"].sort(key=lambda asset: asset["browser_download_url"])
for asset in row["assets"]:
url = asset["browser_download_url"]
download = self._parse_download_url(url)
Expand Down
2 changes: 1 addition & 1 deletion crates/uv-python/src/downloads.inc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub(crate) const PYTHON_DOWNLOADS: &[ManagedPythonDownload] = &[
libc: Libc::None,
variant: PythonVariant::Default
},
url: "https://github.com/astral-sh/python-build-standalone/releases/download/20250212/cpython-3.14.0a5%2B20250212-i686-pc-windows-msvc-shared-install_only_stripped.tar.gz",
url: "https://github.com/astral-sh/python-build-standalone/releases/download/20250212/cpython-3.14.0a5%2B20250212-i686-pc-windows-msvc-install_only_stripped.tar.gz",
sha256: Some("5851a9e6a6afa698fa3ee5b678dff96e612f47e5e2c2f0c032f7c48d42f6a1ac")
},
ManagedPythonDownload {
Expand Down

0 comments on commit 0498b9f

Please sign in to comment.