mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3268: Sphinx crashes with requests package from Debian jessie
This commit is contained in:
parent
70cdc7be8f
commit
62329c82f6
1
CHANGES
1
CHANGES
@ -26,6 +26,7 @@ Bugs fixed
|
|||||||
* The warning type ``misc.highlighting_failure`` does not work
|
* The warning type ``misc.highlighting_failure`` does not work
|
||||||
* #3294: ``add_latex_package()`` make crashes non-LaTeX builders
|
* #3294: ``add_latex_package()`` make crashes non-LaTeX builders
|
||||||
* The caption of table are rendered as invalid HTML (refs: #3287)
|
* The caption of table are rendered as invalid HTML (refs: #3287)
|
||||||
|
* #3268: Sphinx crashes with requests package from Debian jessie
|
||||||
|
|
||||||
|
|
||||||
Release 1.5.1 (released Dec 13, 2016)
|
Release 1.5.1 (released Dec 13, 2016)
|
||||||
|
@ -17,7 +17,12 @@ import pkg_resources
|
|||||||
|
|
||||||
from six import string_types
|
from six import string_types
|
||||||
from six.moves.urllib.parse import urlsplit
|
from six.moves.urllib.parse import urlsplit
|
||||||
from requests.packages.urllib3.exceptions import SSLError, InsecureRequestWarning
|
try:
|
||||||
|
from requests.packages.urllib3.exceptions import SSLError, InsecureRequestWarning
|
||||||
|
except ImportError:
|
||||||
|
# python-requests package in Debian jessie does not provide ``requests.packages.urllib3``.
|
||||||
|
# So try to import the exceptions from urllib3 package.
|
||||||
|
from urllib3.exceptions import SSLError, InsecureRequestWarning
|
||||||
|
|
||||||
# try to load requests[security]
|
# try to load requests[security]
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user