Skip to content

Commit

Permalink
Merge pull request pypa#8504 from McSinyx/list-speed-up-nw
Browse files Browse the repository at this point in the history
Parallelize pip list --outdated and --uptodate
  • Loading branch information
pradyunsg committed Jul 3, 2020
2 parents e2bcc56 + dd3a3b5 commit 0acdbf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/8504.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Parallelize network operations in ``pip list``.
3 changes: 2 additions & 1 deletion src/pip/_internal/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
write_output,
)
from pip._internal.utils.packaging import get_installer
from pip._internal.utils.parallel import map_multithread
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

if MYPY_CHECK_RUNNING:
Expand Down Expand Up @@ -223,7 +224,7 @@ def latest_info(dist):
dist.latest_filetype = typ
return dist

for dist in map(latest_info, packages):
for dist in map_multithread(latest_info, packages):
if dist is not None:
yield dist

Expand Down

0 comments on commit 0acdbf8

Please sign in to comment.