Use sha256 checksum from GitHub API for GraalPy releases (#14779)

## Summary

Follow #14078, use GitHub generated sha256 for GraalPy releases too.

## Test Plan

```console
uv run ./crates/uv-python/fetch-download-metadata.py
```
This commit is contained in:
Jo 2025-07-21 20:35:45 +08:00 committed by GitHub
parent 8ed86a6dcd
commit 9983273289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -607,6 +607,9 @@ class GraalPyFinder(Finder):
platform = self._normalize_os(m.group(1))
arch = self._normalize_arch(m.group(2))
libc = "gnu" if platform == "linux" else "none"
sha256 = None
if digest := asset["digest"]:
sha256 = digest.removeprefix("sha256:")
download = PythonDownload(
release=0,
version=python_version,
@ -619,6 +622,7 @@ class GraalPyFinder(Finder):
implementation=self.implementation,
filename=asset["name"],
url=url,
sha256=sha256,
)
# Only keep the latest GraalPy version of each arch/platform
if (python_version, arch, platform) not in results:
@ -633,6 +637,7 @@ class GraalPyFinder(Finder):
return self.PLATFORM_MAPPING.get(os, os)
async def _fetch_checksums(self, downloads: list[PythonDownload], n: int) -> None:
downloads = list(filter(lambda d: not d.sha256, downloads))
for idx, batch in enumerate(batched(downloads, n)):
logging.info("Fetching GraalPy checksums: %d/%d", idx * n, len(downloads))
checksum_requests = []