mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-24 14:17:49 -05:00
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:
1 parent
92b77a7fed
commit
13bbbe0484
1 file changed
-13
@@ -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')]
|
||||
|
||||
Reference in new issue
Block a user