From 14da187ad60b46a0e657933fd55d99cbb00e1c5c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 5 Nov 2017 11:08:38 +0100 Subject: [PATCH] Python update-python-libraries: fetch and update asynchronously --- maintainers/scripts/update-python-libraries | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maintainers/scripts/update-python-libraries b/maintainers/scripts/update-python-libraries index 7c73510c353a..3ddc8c23a79b 100755 --- a/maintainers/scripts/update-python-libraries +++ b/maintainers/scripts/update-python-libraries @@ -18,6 +18,7 @@ import os import re import requests import toolz +from concurrent.futures import ThreadPoolExecutor as pool INDEX = "https://pypi.io/pypi" """url of PyPI""" @@ -235,7 +236,8 @@ def main(): packages = map(os.path.abspath, args.package) - count = list(map(_update, packages)) + with pool() as p: + count = list(p.map(_update, packages)) logging.info("{} package(s) updated".format(sum(count)))