File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -107,14 +107,30 @@ def execute(self, operations): # type: (Operation) -> int
107
107
self ._sections = OrderedDict ()
108
108
for _ , group in groups :
109
109
tasks = []
110
+ serial_operations = []
110
111
for operation in group :
111
112
if self ._shutdown :
112
113
break
113
114
115
+ # Some operations are unsafe, we mus execute them serially in a group
116
+ # https://github.com/python-poetry/poetry/issues/3086
117
+ # https://github.com/python-poetry/poetry/issues/2658
118
+ is_parallel_unsafe = operation .job_type == "uninstall" or (
119
+ operation .package .develop
120
+ and operation .package .source_type == "directory"
121
+ )
122
+ if not operation .skipped and is_parallel_unsafe :
123
+ serial_operations .append (operation )
124
+ continue
125
+
114
126
tasks .append (self ._executor .submit (self ._execute_operation , operation ))
115
127
116
128
try :
117
129
wait (tasks )
130
+
131
+ for operation in serial_operations :
132
+ wait ([self ._executor .submit (self ._execute_operation , operation )])
133
+
118
134
except KeyboardInterrupt :
119
135
self ._shutdown = True
120
136
You can’t perform that action at this time.
0 commit comments