mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Copy debuglevel and _http_vsn attrs into response classes
Copy the `debuglevel` and `_http_vsn` attributes from base connection class into response classes, in order to fix compatibility with Python 3.12. For reasons I don't comprehend, these end up being called on the class rather than instance, so regular proxying logic does not work. Fixes #707
This commit is contained in:
committed by
Jair Henrique
parent
469a10b980
commit
69621c67fb
@@ -389,6 +389,8 @@ class VCRHTTPConnection(VCRConnection):
|
||||
|
||||
_baseclass = HTTPConnection
|
||||
_protocol = "http"
|
||||
debuglevel = _baseclass.debuglevel
|
||||
_http_vsn = _baseclass._http_vsn
|
||||
|
||||
|
||||
class VCRHTTPSConnection(VCRConnection):
|
||||
@@ -397,3 +399,5 @@ class VCRHTTPSConnection(VCRConnection):
|
||||
_baseclass = HTTPSConnection
|
||||
_protocol = "https"
|
||||
is_verified = True
|
||||
debuglevel = _baseclass.debuglevel
|
||||
_http_vsn = _baseclass._http_vsn
|
||||
|
||||
Reference in New Issue
Block a user