Prefetch metadata in `--no-deps` mode (#5918)

## Summary

This _used_ to be true but we now require fetching metadata for all
distributions even with `--no-deps` since, e.g., we validate that any
declared extras exist.
This commit is contained in:
Charlie Marsh 2024-08-08 12:35:15 -04:00 committed by GitHub
parent eb6251e0ed
commit 32f09d86b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 10 deletions

View File

@ -362,16 +362,13 @@ impl<InstalledPackages: InstalledPackagesProvider> ResolverState<InstalledPackag
));
}
// Pre-visit all candidate packages, to allow metadata to be fetched in parallel. If
// the dependency mode is direct, we only need to visit the root package.
if self.dependency_mode.is_transitive() {
Self::pre_visit(
state.pubgrub.partial_solution.prioritized_packages(),
&self.urls,
&state.python_requirement,
&request_sink,
)?;
}
// Pre-visit all candidate packages, to allow metadata to be fetched in parallel.
Self::pre_visit(
state.pubgrub.partial_solution.prioritized_packages(),
&self.urls,
&state.python_requirement,
&request_sink,
)?;
// Choose a package version.
let Some(highest_priority_pkg) = state