Skip to content

Commit

Permalink
requests.packages is deprecated, import from urllib3 (#10563)
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jun 16, 2022
1 parent ea14dd5 commit c40bb72
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions sphinx/util/requests.py
Expand Up @@ -7,21 +7,11 @@
from urllib.parse import urlsplit

import requests
from urllib3.exceptions import InsecureRequestWarning

import sphinx
from sphinx.config import Config

try:
from requests.packages.urllib3.exceptions import InsecureRequestWarning
except ImportError:
try:
# for Debian-jessie
from urllib3.exceptions import InsecureRequestWarning
except ImportError:
# for requests < 2.4.0
InsecureRequestWarning = None


useragent_header = [('User-Agent',
'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0')]

Expand Down

0 comments on commit c40bb72

Please sign in to comment.