mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Fallback to importing from urllib3
requests.packages.urllib3 may be literally urllib3 instead of vendored urllib3.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
'''Stubs for requests'''
|
||||
|
||||
from requests.packages.urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
||||
try:
|
||||
from requests.packages.urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
||||
except ImportError:
|
||||
from urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
||||
|
||||
from ..stubs import VCRHTTPConnection, VCRHTTPSConnection
|
||||
|
||||
# urllib3 defines its own HTTPConnection classes, which requests goes ahead and assumes
|
||||
|
||||
Reference in New Issue
Block a user