diff options
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py')
-rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py new file mode 100644 index 0000000..accb927 --- /dev/null +++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py | |||
@@ -0,0 +1,19 @@ | |||
1 | import sys | ||
2 | |||
3 | try: | ||
4 | # Our match_hostname function is the same as 3.5's, so we only want to | ||
5 | # import the match_hostname function if it's at least that good. | ||
6 | if sys.version_info < (3, 5): | ||
7 | raise ImportError("Fallback to vendored code") | ||
8 | |||
9 | from ssl import CertificateError, match_hostname | ||
10 | except ImportError: | ||
11 | try: | ||
12 | # Backport of the function from a pypi module | ||
13 | from backports.ssl_match_hostname import CertificateError, match_hostname | ||
14 | except ImportError: | ||
15 | # Our vendored copy | ||
16 | from ._implementation import CertificateError, match_hostname | ||
17 | |||
18 | # Not needed, but documenting what we provide. | ||
19 | __all__ = ('CertificateError', 'match_hostname') | ||