Files
uv/crates/uv-python
Gyeongjae Choi 7b497d48bd Use latest Pyodide version for each python version (#17372)
## Summary

This changes how the `download-metadata.json` file is generated for
Pyodide.

Previously, if we have a different Pyodide version with a same Python
version, the older Pyodide version is selected.

For example, say we have

- Pyodide 0.29.0 with Python 3.13.2
- Pyodide 0.28.3 with Python 3.13.2

then, pyodide 0.28.3 was stored in `download-metadata.json` as we
iterate in decending order with overwriting the value that was
previously written.

I fixed it by picking up the latest Pyodide version for each Python
version.

## Test Plan

Ran `uv run -- crates/uv-python/fetch-download-metadata.py` locally, and
verified the output:

```
2026-01-09 15:39:23 INFO Fetching Pyodide checksums: 0/4
2026-01-09 15:39:24 INFO Selected cpython-3.13.2-emscripten-wasm32-musl (0.29.1)
2026-01-09 15:39:24 INFO Selected cpython-3.12.7-emscripten-wasm32-musl (0.27.7)
2026-01-09 15:39:24 INFO Selected cpython-3.12.1-emscripten-wasm32-musl (0.26.4)
2026-01-09 15:39:24 INFO Selected cpython-3.11.3-emscripten-wasm32-musl (0.25.1)
```
2026-01-12 17:59:26 -06:00
..
2025-12-04 10:18:41 +01:00
2026-01-09 22:09:11 +00:00
2026-01-09 22:09:11 +00:00

uv-python

This crate is an internal component of uv. The Rust API exposed here is unstable and will have frequent breaking changes.

This version (0.0.13) is a component of uv 0.9.24. The source can be found here.

See uv's crate versioning policy for details on versioning.