Skip to content

Commit

Permalink
Regression fix: don't prefetch source dists with unbounded lower-boun…
Browse files Browse the repository at this point in the history
…d ranges (#7683)

#7226 modified the check to skip prefetching of source dists without
proper minimum-version bounds, and wound up flipping the boolean
expression. This change flips the some/none expression so that the
intended skip happens as expected.

Fixes #7680.
  • Loading branch information
topherinternational authored Sep 25, 2024
1 parent 82e33c2 commit 84e5f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/uv-resolver/src/resolver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,7 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
// Avoid prefetching source distributions with unbounded lower-bound ranges. This
// often leads to failed attempts to build legacy versions of packages that are
// incompatible with modern build tools.
if dist.wheel().is_some() {
if dist.wheel().is_none() {
if !self.selector.use_highest_version(&package_name) {
if let Some((lower, _)) = range.iter().next() {
if lower == &Bound::Unbounded {
Expand Down

0 comments on commit 84e5f6e

Please sign in to comment.