Skip to content

Commit

Permalink
Simplify version ranges reported for unavailable packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 16, 2024
1 parent 92ff120 commit 4685604
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 43 deletions.
3 changes: 2 additions & 1 deletion crates/uv-resolver/src/pubgrub/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ impl ReportFormatter<PubGrubPackage, Range<Version>, UnavailableReason>
format!("{}{reason}", Padded::new("", &package, " "))
}
UnavailableReason::Version(reason) => {
let set = self.simplify_set(set, package);
format!(
"{}{reason}",
Padded::new("", &self.compatible_range(package, set), " ")
Padded::new("", &self.compatible_range(package, &set), " ")
)
}
}
Expand Down
8 changes: 2 additions & 6 deletions crates/uv/tests/cache_prune.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,8 @@ fn prune_unzipped() -> Result<()> {
iniconfig<=0.1
iniconfig>=1.0.0
and any of:
iniconfig==0.1
iniconfig==1.0.0
iniconfig==1.0.1
iniconfig==1.1.0
iniconfig==1.1.1
iniconfig==2.0.0
iniconfig<=0.1
iniconfig>=1.0.0
needs to be downloaded from a registry, we can conclude that iniconfig<1.0.0 cannot be used.
And because you require iniconfig, we can conclude that your requirements are unsatisfiable.
Expand Down
41 changes: 5 additions & 36 deletions crates/uv/tests/pip_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1926,42 +1926,11 @@ fn install_only_binary_all_and_no_binary_all() {
anyio>=3.7.0,<=3.7.1
anyio>=4.0.0
and any of:
anyio==1.0.0
anyio==1.1.0
anyio==1.2.0
anyio==1.2.1
anyio==1.2.2
anyio==1.2.3
anyio==1.3.0
anyio==1.3.1
anyio==1.4.0
anyio==2.0.0
anyio==2.0.1
anyio==2.0.2
anyio==2.1.0
anyio==2.2.0
anyio==3.0.0
anyio==3.0.1
anyio==3.1.0
anyio==3.2.0
anyio==3.2.1
anyio==3.3.0
anyio==3.3.1
anyio==3.3.2
anyio==3.3.3
anyio==3.3.4
anyio==3.4.0
anyio==3.5.0
anyio==3.6.0
anyio==3.6.1
anyio==3.6.2
anyio==3.7.0
anyio==3.7.1
anyio==4.0.0
anyio==4.1.0
anyio==4.2.0
anyio==4.3.0
anyio==4.4.0
anyio>=1.0.0,<=1.4.0
anyio>=2.0.0,<=2.2.0
anyio>=3.0.0,<=3.6.2
anyio>=3.7.0,<=3.7.1
anyio>=4.0.0
has no usable wheels and building from source is disabled, we can conclude that any of:
anyio<1.1.0
anyio>1.4.0,<2.0.0
Expand Down

0 comments on commit 4685604

Please sign in to comment.