Closed sileht closed 3 years ago
New version of httpx (>=0.15) have change httpx.Response attributes list. The current vcrpy stubs is impacted by this change:
@patch("httpx.Response.close", MagicMock()) @patch("httpx.Response.read", MagicMock()) def _from_serialized_response(request, serialized_response, history=None): content = serialized_response.get("content").encode() > response = httpx.Response( status_code=serialized_response.get("status_code"), request=request, http_version=serialized_response.get("http_version"), headers=_from_serialized_headers(serialized_response.get("headers")), content=content, history=history or [], ) E TypeError: __init__() got an unexpected keyword argument 'http_version' .tox/py38/lib/python3.8/site-packages/vcr/stubs/httpx_stubs.py:52: TypeError
fixed in master branch
I just test 4.1.1, cassettes are not compatible with those recorded with httpx < 0.15. But I have re-recorded some cassettes it seems to works well. So I started the rerecord of everything.
New version of httpx (>=0.15) have change httpx.Response attributes list. The current vcrpy stubs is impacted by this change: