summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTzu-ping Chung <uranusjr@gmail.com>2021-07-23 11:06:29 +0800
committerGitHub <noreply@github.com>2021-07-23 11:06:29 +0800
commit1c4753f299c00c74882e80211f91daf80c870041 (patch)
tree311ddb01dc8131896487eb01d3f27a4dfd4addd5 /tools
parent6af77395961076c0d6f26ed9b2fe010b8b9e974f (diff)
downloadpip-1c4753f299c00c74882e80211f91daf80c870041.tar.gz
Vendoring update for 21.2 (#10179)
Diffstat (limited to 'tools')
-rw-r--r--tools/vendoring/patches/tenacity.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/vendoring/patches/tenacity.patch b/tools/vendoring/patches/tenacity.patch
index 006588b36..244254491 100644
--- a/tools/vendoring/patches/tenacity.patch
+++ b/tools/vendoring/patches/tenacity.patch
@@ -1,21 +1,21 @@
-diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py
-index 5f8cb5058..42e9d8940 100644
+diff --git a/src/pip/_vendor/tenacity/__init__.py b/src/pip/_vendor/tenacity/__init__.py
+index 88c28d2d6..f984eec4e 100644
--- a/src/pip/_vendor/tenacity/__init__.py
+++ b/src/pip/_vendor/tenacity/__init__.py
-@@ -22,10 +22,12 @@ try:
- except ImportError:
- iscoroutinefunction = None
-
+@@ -76,10 +76,12 @@ from .after import after_nothing # noqa
+ from .before_sleep import before_sleep_log # noqa
+ from .before_sleep import before_sleep_nothing # noqa
+
-try:
-- import tornado
+- import tornado # type: ignore
-except ImportError:
-- tornado = None
+- tornado = None # type: ignore
+# Replace a conditional import with a hard-coded None so that pip does
+# not attempt to use tornado even if it is present in the environment.
+# If tornado is non-None, tenacity will attempt to execute some code
+# that is sensitive to the version of tornado, which could break pip
+# if an old version is found.
-+tornado = None
-
- import sys
- import threading
++tornado = None # type: ignore
+
+ if t.TYPE_CHECKING:
+ import types