Skip to content

Commit dd3a3b5

Browse files
committed
Parallelize network operations in pip list
1 parent 3a22663 commit dd3a3b5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

news/8504.feature

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Parallelize network operations in ``pip list``.

src/pip/_internal/commands/list.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
write_output,
2020
)
2121
from pip._internal.utils.packaging import get_installer
22+
from pip._internal.utils.parallel import map_multithread
2223
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
2324

2425
if MYPY_CHECK_RUNNING:
@@ -223,7 +224,7 @@ def latest_info(dist):
223224
dist.latest_filetype = typ
224225
return dist
225226

226-
for dist in map(latest_info, packages):
227+
for dist in map_multithread(latest_info, packages):
227228
if dist is not None:
228229
yield dist
229230

0 commit comments

Comments
 (0)