Skip to content

Commit ecc2697

Browse files
radoeringabn
authored andcommitted
fix: restore code that makes sure that operations concerning pip are executed first
This was removed overzealously in #9392 due to the misleading comment (which has been clarified now).
1 parent 0bb2a9c commit ecc2697

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/poetry/installation/executor.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,14 @@ def execute(self, operations: list[Operation]) -> int:
148148
self._sections = {}
149149
self._yanked_warnings = []
150150

151+
# pip has to be installed/updated first without parallelism
152+
# because we still need it for uninstalls
153+
for i, op in enumerate(operations):
154+
if op.package.name == "pip":
155+
wait([self._executor.submit(self._execute_operation, op)])
156+
del operations[i]
157+
break
158+
151159
# We group operations by priority
152160
groups = itertools.groupby(operations, key=lambda o: -o.priority)
153161
for _, group in groups:

0 commit comments

Comments
 (0)