Avatar for the astral-sh user
astral-sh
uv
BlogDocsChangelog

Performance History

Latest Results

Simplify speculative metadata requests
charlie/codex-conflict-generalization
37 minutes ago
Prioritize active metadata requests
charlie/codex-conflict-generalization
52 minutes ago
Prioritize active metadata requests
charliermarsh:charlie/codex-conflict-generalization
57 minutes ago
Sync index format when `uv add --index` updates an existing index URL (#19818) ## Summary `uv add --index <name>=<url>` matches an existing index by name and overwrites its `url`, but it previously left the `format` key in place. An index declared as `format = "flat"` keeps that format even after being repointed at a Simple-API URL, silently producing an inconsistent configuration. The add itself succeeds (the CLI-supplied index carries the correct Simple format), so the breakage only surfaces later — a subsequent `uv lock` reads the stale `format = "flat"` and fails to resolve. Reproduction from #19759: ```console $ uv init --bare --name test $ cat >> pyproject.toml <<EOF [[tool.uv.index]] name = "index" url = "https://example.com/flat" format = "flat" EOF $ uv add iniconfig --index index=https://pypi.org/simple $ grep -A3 'tool.uv.index' pyproject.toml [[tool.uv.index]] name = "index" url = "https://pypi.org/simple" format = "flat" # <-- stale, breaks `uv lock` ``` ## Changes In `PyProjectTomlMut::add_index`, capture whether the URL is actually changing. When it is, sync the `format` to match the incoming index: - write `format = "flat"` for flat indexes, and - drop the `format` key entirely for Simple indexes (the default). When the URL is unchanged, the existing `format` is left untouched, so entries that aren't being repointed keep their configuration. ## Test Two unit tests in `pyproject_mut.rs`, matching the module's existing test style: - `add_index_clears_format_on_url_update` — repointing a flat index at a Simple URL removes the stale `format` key. - `add_index_preserves_format_when_url_unchanged` — re-adding the same URL leaves `format = "flat"` intact. Closes #19759 --- I used AI as a coding assistant for this contribution, in accordance with the project's [AI Policy](https://github.com/astral-sh/.github/blob/main/AI_POLICY.md). --------- Co-authored-by: BitWeaverDev <hi.bitweaver@gmail.com> Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
main
6 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Prioritize solver-blocking metadata requests over pre-fetch requests#20082
47 minutes ago
28f20af
charlie/codex-conflict-generalization
CodSpeed Performance Gauge
0%
Prioritize active metadata requests#20081
1 hour ago
dba7ca2
charliermarsh:charlie/codex-conflict-generalization
CodSpeed Performance Gauge
+1%
7 hours ago
b4c7aaa
charliermarsh:charlie/codex-shallow-conflict-restart
© 2026 CodSpeed Technology
Home Terms Privacy Docs