Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,18 @@ def execute(self, operations: list[Operation]) -> int:
if operations and (self._enabled or self._dry_run):
self._display_summary(operations)

# We group operations by priority
groups = itertools.groupby(operations, key=lambda o: -o.priority)
self._sections = {}
self._yanked_warnings = []

# pip has to be installed first without parallelism if we install via pip
for i, op in enumerate(operations):
if op.package.name == "pip":
wait([self._executor.submit(self._execute_operation, op)])
del operations[i]
break

# We group operations by priority
groups = itertools.groupby(operations, key=lambda o: -o.priority)
for _, group in groups:
tasks = []
serial_operations = []
Expand Down