Skip to content

Commit 183e47f

Browse files
committed
Improve --dry-run with legacy resolver
1 parent 7cdc1aa commit 183e47f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pip/_internal/commands/install.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ def run(self, options: Values, args: List[str]) -> int:
356356
if options.dry_run:
357357
would_install_items = sorted(
358358
(r.metadata["name"], r.metadata["version"])
359-
for r in requirement_set.all_requirements
359+
# Use get_installation_order because it does some important
360+
# filtering with the legacy resolver.
361+
for r in resolver.get_installation_order(requirement_set)
360362
)
361363
if would_install_items:
362364
write_output(

0 commit comments

Comments
 (0)