mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Since urllib3 v2 the re-export of connection.HTTPConnection in urllib3.connectionpool was removed. In this commit we use urllib3.connection where needed. Some references to connectionpool.HTTPConnection are still there for backward compatibility. Closes #688
17 lines
558 B
Python
17 lines
558 B
Python
"""Stubs for requests"""
|
|
|
|
from urllib3.connection 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
|