Skip to content

Commit 48d0a2e

Browse files
exslimjairhenrique
authored andcommitted
Fixed missing version_string attribute when used with urllib3>=2.3.0
urllib3 in v2.3.0 introduced attribute `version_string` (https://github.com/urllib3/urllib3/pull/3316/files). This attribute is missing in `VCRHTTPResponse` which causes errors like AttributeError: 'VCRHTTPResponse' object has no attribute 'version_string' This fixes #888
1 parent 5b858b1 commit 48d0a2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vcr/stubs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def __init__(self, recorded_response):
6666
self.reason = recorded_response["status"]["message"]
6767
self.status = self.code = recorded_response["status"]["code"]
6868
self.version = None
69+
self.version_string = None
6970
self._content = BytesIO(self.recorded_response["body"]["string"])
7071
self._closed = False
7172
self._original_response = self # for requests.session.Session cookie extraction

0 commit comments

Comments
 (0)