summaryrefslogtreecommitdiff
path: root/sphinx/util/requests.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-21 01:01:36 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-21 01:01:36 +0900
commit3a4ae2092a6f236e2d71fdedb4b66f594e30d4e7 (patch)
treeafa4f774e0f8660d5ce247f01cace9deaa848d58 /sphinx/util/requests.py
parentf3a6004f822b05e352372a77f449332ad230d21e (diff)
parent18b2707b2ac621f23f8ee6a7ca19bf1590be7826 (diff)
downloadsphinx-git-3a4ae2092a6f236e2d71fdedb4b66f594e30d4e7.tar.gz
Merge branch '3.x'
Diffstat (limited to 'sphinx/util/requests.py')
-rw-r--r--sphinx/util/requests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py
index b3fc8bc35..ca570249a 100644
--- a/sphinx/util/requests.py
+++ b/sphinx/util/requests.py
@@ -18,6 +18,7 @@ import requests
import sphinx
from sphinx.config import Config
+from sphinx.deprecation import RemovedInSphinx50Warning
try:
from requests.packages.urllib3.exceptions import SSLError
@@ -43,6 +44,10 @@ useragent_header = [('User-Agent',
def is_ssl_error(exc: Exception) -> bool:
"""Check an exception is SSLError."""
+ warnings.warn(
+ "is_ssl_error() is outdated and likely returns incorrect results "
+ "for modern versions of Requests.",
+ RemovedInSphinx50Warning)
if isinstance(exc, SSLError):
return True
else: