Skip to content

Commit

Permalink
fix: restore code that makes sure that operations concerning pip are …
Browse files Browse the repository at this point in the history
…executed first

This was removed overzealously in poetry#9392 due to the misleading comment (which has been clarified now).
  • Loading branch information
radoering committed Jan 24, 2025
1 parent 0bb2a9c commit 231abf9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ def execute(self, operations: list[Operation]) -> int:
self._sections = {}
self._yanked_warnings = []

# pip has to be installed/updated first without parallelism
# because we still need it for uninstalls
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:
Expand Down

0 comments on commit 231abf9

Please sign in to comment.