diff options
Diffstat (limited to 'sphinx/util/requests.py')
-rw-r--r-- | sphinx/util/requests.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py index a279b4eb4..64bd8773f 100644 --- a/sphinx/util/requests.py +++ b/sphinx/util/requests.py @@ -13,7 +13,6 @@ from contextlib import contextmanager from typing import Generator, Union from urllib.parse import urlsplit -import pkg_resources import requests from sphinx.config import Config @@ -35,28 +34,6 @@ except ImportError: # for requests < 2.4.0 InsecureRequestWarning = None # type: ignore -try: - from requests.packages.urllib3.exceptions import InsecurePlatformWarning -except ImportError: - try: - # for Debian-jessie - from urllib3.exceptions import InsecurePlatformWarning # type: ignore - except ImportError: - # for requests < 2.4.0 - InsecurePlatformWarning = None # type: ignore - -# try to load requests[security] (but only if SSL is available) -try: - import ssl # NOQA -except ImportError: - pass -else: - try: - pkg_resources.require(['requests[security]']) - except (pkg_resources.DistributionNotFound, - pkg_resources.VersionConflict): - pass # ignored - useragent_header = [('User-Agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0')] |