Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions crates/uv/src/commands/python/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,20 @@ pub(crate) async fn list(
}
}

// Only show the latest patch version for each download unless all were requested
// Only show the latest patch version for each download unless all were requested.
//
// We toggle off platforms/arches based unless all_platforms/all_arches because
// we want to only show the "best" option for each version by default, even
// if e.g. the x86_32 build would also work on x86_64.
if !matches!(kind, Kind::System) {
if let [major, minor, ..] = *key.version().release() {
if !seen_minor.insert((
*key.os(),
all_platforms.then_some(*key.os()),
major,
minor,
key.variant(),
key.implementation(),
*key.arch(),
all_arches.then_some(*key.arch()),
*key.libc(),
)) {
if matches!(kind, Kind::Download) && !all_versions {
Expand All @@ -186,13 +190,13 @@ pub(crate) async fn list(
}
if let [major, minor, patch] = *key.version().release() {
if !seen_patch.insert((
*key.os(),
all_platforms.then_some(*key.os()),
major,
minor,
patch,
key.variant(),
key.implementation(),
*key.arch(),
all_arches.then_some(*key.arch()),
key.libc(),
)) {
if matches!(kind, Kind::Download) {
Expand Down
Loading