Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
08ab6ca4
Commit
08ab6ca4
authored
Oct 06, 2020
by
Arun Babu Neelicattu
Committed by
finswimmer
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
executor: execute parallel unsafe ops serially
Resolves: #2658 #3086
parent
27858e82
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
poetry/installation/executor.py
+19
-0
No files found.
poetry/installation/executor.py
View file @
08ab6ca4
...
@@ -107,14 +107,33 @@ class Executor(object):
...
@@ -107,14 +107,33 @@ class Executor(object):
self
.
_sections
=
OrderedDict
()
self
.
_sections
=
OrderedDict
()
for
_
,
group
in
groups
:
for
_
,
group
in
groups
:
tasks
=
[]
tasks
=
[]
serial_operations
=
[]
for
operation
in
group
:
for
operation
in
group
:
if
self
.
_shutdown
:
if
self
.
_shutdown
:
break
break
# Some operations are unsafe, we mus execute them serially in a group
# https://github.com/python-poetry/poetry/issues/3086
# https://github.com/python-poetry/poetry/issues/2658
#
# We need to explicitly check source type here, see:
# https://github.com/python-poetry/poetry-core/pull/98
is_parallel_unsafe
=
operation
.
job_type
==
"uninstall"
or
(
operation
.
package
.
develop
and
operation
.
package
.
source_type
in
{
"directory"
,
"git"
}
)
if
not
operation
.
skipped
and
is_parallel_unsafe
:
serial_operations
.
append
(
operation
)
continue
tasks
.
append
(
self
.
_executor
.
submit
(
self
.
_execute_operation
,
operation
))
tasks
.
append
(
self
.
_executor
.
submit
(
self
.
_execute_operation
,
operation
))
try
:
try
:
wait
(
tasks
)
wait
(
tasks
)
for
operation
in
serial_operations
:
wait
([
self
.
_executor
.
submit
(
self
.
_execute_operation
,
operation
)])
except
KeyboardInterrupt
:
except
KeyboardInterrupt
:
self
.
_shutdown
=
True
self
.
_shutdown
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment