Regression fix: don't prefetch source dists with unbounded lower-bound 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.
This commit is contained in:
Topher Anderson 2024-09-25 07:35:19 -05:00 committed by GitHub
parent 82e33c2b3d
commit 84e5f6e871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 {