From 4a063b750f107fccce9549764775d5bfb407c501 Mon Sep 17 00:00:00 2001 From: Pradyun Gedam Date: Thu, 7 May 2020 23:57:17 +0530 Subject: [PATCH] Merge pull request #8167 from pradyunsg/drop-list-parallelization --- news/8167.removal | 1 + src/pip/_internal/commands/list.py | 12 +----------- 2 files changed, 2 insertions(+), 11 deletions(-) create mode 100644 news/8167.removal diff --git a/news/8167.removal b/news/8167.removal new file mode 100644 index 00000000000..d719377eb26 --- /dev/null +++ b/news/8167.removal @@ -0,0 +1 @@ +Drop parallelization from ``pip list --outdated``. diff --git a/src/pip/_internal/commands/list.py b/src/pip/_internal/commands/list.py index cf3be7eb459..2aa3075b1b7 100644 --- a/src/pip/_internal/commands/list.py +++ b/src/pip/_internal/commands/list.py @@ -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 @@ -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,