-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add parallel install with fall-back to serial install when no multiprocessing available #8215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
d2f61ec
Add parallel (multi-process) install, if multiprocessing Pool is not …
dd9cbf9
Add multiprocessing feature news
02301f1
CI pep8, flake8, mypy, py27
8c47179
Restored code after bad rebase
8133130
Fix rebase
1fac1ed
Fix linter
f57a66d
Fix rebase
c8e8a41
Add map_multiprocess_ordered to internal.utils.parallel
78851ea
Rename internal function __ to _
29c614e
Fix comments
e1e2018
Refactor requirements installation loop
db2794e
Update news/8187.feature.rst
bmartinn fe81fa2
Refactor create parallel package installation index list
50dae8d
Remove redundant exception and refactor should_parallel_reqs
647be53
Improve code readability
de4d416
Add --use-feature=parallel-install (default off), debug log, simple test
18d16d9
Add test parallel install debug logs
5a71062
Rename variables, add documentation
5e7332e
Move freeze_support from __main__ to main()
274b108
Remove old comment
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Run the wheel install in a multiprocessing Pool, this has significant performance gain | ||
when installing cached packages. Packages that could not be installed | ||
(exception raised) will be installed serially once the Pool is done. | ||
If multiprocessing.Pool is not supported by the platform, | ||
fall-back to serial installation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logs a successful install but just after, it may throw an exception:
isinstance(install_result, BaseException)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbidoul when calling
_single_install
withsuppress_exception=False
it will not suppress the exception but raise it. This means you will not getisinstance(install_result, BaseException)
in this section, hence if we passed the_single_install
call, the installation was successful.