From 86f8bb83ab6653710f4082ae42bf9f22358c9c07 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 12 Aug 2019 13:52:22 -0700 Subject: [PATCH] =?UTF-8?q?setup=5Fvenv:=20Don=E2=80=99t=20pip=20uninstall?= =?UTF-8?q?=20typing;=20it=E2=80=99s=20no=20longer=20installed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Anders Kaseorg --- scripts/lib/setup_venv.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/lib/setup_venv.py b/scripts/lib/setup_venv.py index 72801b578b..c475139bcb 100644 --- a/scripts/lib/setup_venv.py +++ b/scripts/lib/setup_venv.py @@ -2,7 +2,6 @@ import logging import os import shutil import subprocess -import sys from scripts.lib.zulip_tools import run, run_as_root, ENDC, WARNING from scripts.lib.hash_reqs import expand_reqs @@ -344,14 +343,4 @@ def do_setup_virtualenv(venv_path, requirements_file, virtualenv_args): print(WARNING + "`pip install` failed; retrying..." + ENDC) install_venv_deps(pip, requirements_file) - # The typing module has been included in stdlib since 3.5. - # Installing a pypi version of it has been harmless until a bug - # "AttributeError: type object 'Callable' has no attribute - # '_abc_registry'" happens in 3.7. And so just to be safe, it is - # disabled from now on for all >= 3.5 versions. - # Remove this once 3.4 is no longer supported. - at_least_35 = (sys.version_info.major == 3) and (sys.version_info.minor >= 5) - if at_least_35 and ('python2.7' not in virtualenv_args): - run([pip, "uninstall", "-y", "typing"]) - run_as_root(["chmod", "-R", "a+rX", venv_path])