Open
Description
urllib3
allows the kwargs decode_content=None
and cache_content=False
.
If trying to patch a library that uses something like:
myresponse.read(decode_content=True)
then patching failes with:
Editing VCRHTTPResponse.read as follows fixes the issue:
def read(self, *args, **kwargs):
# urllib3 allows the kwarg 'decode_content' but BytesIO does not support it
kwargs.pop("decode_content", None)
return self._content.read(*args, **kwargs)
I'm not sure if this is the way to go though.
Metadata
Metadata
Assignees
Labels
No labels