Skip to content

Commit

Permalink
Parallelize network operations in pip list
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Jun 29, 2020
1 parent 3a22663 commit dd3a3b5
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 dd3a3b5

Please sign in to comment.