mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Format with line length 110 to match flake8 make black part of linting check Update travis spec for updated black requirements Add diff output for black on failure update changelog
20 lines
688 B
Python
20 lines
688 B
Python
"""Stubs for requests"""
|
|
|
|
try:
|
|
from urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
|
except ImportError:
|
|
from requests.packages.urllib3.connectionpool import HTTPConnection, VerifiedHTTPSConnection
|
|
|
|
from ..stubs import VCRHTTPConnection, VCRHTTPSConnection
|
|
|
|
# urllib3 defines its own HTTPConnection classes, which requests goes ahead and assumes
|
|
# you're using. It includes some polyfills for newer features missing in older pythons.
|
|
|
|
|
|
class VCRRequestsHTTPConnection(VCRHTTPConnection, HTTPConnection):
|
|
_baseclass = HTTPConnection
|
|
|
|
|
|
class VCRRequestsHTTPSConnection(VCRHTTPSConnection, VerifiedHTTPSConnection):
|
|
_baseclass = VerifiedHTTPSConnection
|