Merge pull request #8167 from pradyunsg/drop-list-parallelization

This commit is contained in:
Pradyun Gedam 2020-05-07 23:57:17 +05:30 committed by GitHub
commit 5cac4dc6bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 11 deletions

1
news/8167.removal Normal file
View File

@ -0,0 +1 @@
Drop parallelization from ``pip list --outdated``.

View File

@ -5,10 +5,8 @@ from __future__ import absolute_import
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
@ -210,18 +208,10 @@ class ListCommand(IndexGroupCommand):
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,