1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Merge pull request #223 from jayvdb/jessie-fix

Fallback to importing from urllib3
This commit is contained in:
Aron Griffis
2015-11-24 15:14:09 -05:00

View File

@@ -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