Improve --dry-run with legacy resolver
@@ -356,7 +356,9 @@ class InstallCommand(RequirementCommand):
if options.dry_run:
would_install_items = sorted(
(r.metadata["name"], r.metadata["version"])
- for r in requirement_set.all_requirements
+ # Use get_installation_order because it does some important
+ # filtering with the legacy resolver.
+ for r in resolver.get_installation_order(requirement_set)
)
if would_install_items:
write_output(
