Remove empty code block in sphinx.util.requests

Empty since 19a187cb54.

If requests is installed with the security extras, they will be loaded
automatically by requests. The is no need to proactively load it. The
block simply did a "pass" in all cases.
This commit is contained in:
Jon Dufresne committed 2019-06-12 19:22:02 -07:00
1 parent 92b77a7fed
commit 13bbbe0484
1 file changed
-13
-13
View File
@@ -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
@@ -45,18 +44,6 @@ 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')]