Skip to content

[pull] main from astral-sh:main#54

Merged
pull[bot] merged 2 commits into
Moshbbab:mainfrom
astral-sh:main
Jun 25, 2026
Merged

[pull] main from astral-sh:main#54
pull[bot] merged 2 commits into
Moshbbab:mainfrom
astral-sh:main

Conversation

@pull

@pull pull Bot commented Jun 25, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Sanjays2402 and others added 2 commits June 25, 2026 09:53
## Summary

When parsing a registry's simple index, entries that aren't valid wheel
or source-distribution filenames are skipped silently except for an
opaque `Skipping file for <pkg>: <name>` debug line that gives no
reason. This makes it hard to diagnose registries that serve
non-distribution entries (for example devpi index-management links like
`+searchhelp`, bare version-directory links, or files with unrecognized
extensions).

This adds `DistFilename::try_from_filename_with_reason`, which returns a
typed `DistFilenameError` explaining why a filename was rejected (no
recognized extension, invalid wheel, or invalid source dist). The
existing `try_from_filename` is kept as a thin `.ok()` wrapper, and the
two skip sites in `registry_client.rs` now log the reason alongside the
filename.

## Test Plan

Added unit tests in `crates/uv-distribution-filename/src/lib.rs`
covering:
- a bare version string (`0.1.0`) → `NoRecognizedExtension`,
- an empty filename → `NoRecognizedExtension`,
- a `.whl` with an otherwise-invalid name → `InvalidWheel`,
- a valid wheel still parses via `try_from_filename`.

Run with `cargo test -p uv-distribution-filename`.

## AI assistance notice

Disclosing in the interest of transparency: this change was prepared
with the help of an AI coding assistant and reviewed before submission.
If that conflicts with the project's contribution policy, please feel
free to close it.
@pull pull Bot locked and limited conversation to collaborators Jun 25, 2026
@pull pull Bot added the ⤵️ pull label Jun 25, 2026
@pull pull Bot merged commit 5ba8936 into Moshbbab:main Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants