Skip to content
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

Drop parallelization in pip list #8167

Merged
merged 2 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/8167.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop parallelization from ``pip list --outdated``.
12 changes: 1 addition & 11 deletions src/pip/_internal/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@

import json
import logging
from multiprocessing.dummy import Pool

from pip._vendor import six
from pip._vendor.requests.adapters import DEFAULT_POOLSIZE

from pip._internal.cli import cmdoptions
from pip._internal.cli.req_command import IndexGroupCommand
Expand Down Expand Up @@ -210,18 +208,10 @@ def latest_info(dist):
dist.latest_filetype = typ
return dist

# This is done for 2x speed up of requests to pypi.org
# so that "real time" of this function
# is almost equal to "user time"
pool = Pool(DEFAULT_POOLSIZE)

for dist in pool.imap_unordered(latest_info, packages):
for dist in map(latest_info, packages):
if dist is not None:
yield dist

pool.close()
pool.join()

def output_package_listing(self, packages, options):
packages = sorted(
packages,
Expand Down