Skip to content
Myr

repr change: <SyncResponse ...> -> <Response ...>

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by Tom Christie · parent e40b0bf · Browse files · 2 files+3 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−5 removed

  • tests:+1 added−1 removed
  • other:+2 added−4 removed

2 files+3 added−5 removed

modified:httpcore/models.py+2 added-4 removed
742 unmodified lines
743 if message:744 raise HttpError(message)745746 def __repr__(self) -> str:747 class_name = self.__class__.__name__748 return f"<{class_name}({self.status_code}, {self.reason_phrase!r})>"747 return f"<Response({self.status_code}, {self.reason_phrase!r})>"748749750class SyncResponse:751 """
70 unmodified lines
822 def close(self) -> None:823 return self._loop.run_until_complete(self._response.close())824825 def __repr__(self) -> str:827 class_name = self.__class__.__name__828 return f"<{class_name}({self.status_code}, {self.reason_phrase!r})>"826 return f"<Response({self.status_code}, {self.reason_phrase!r})>"
modified:tests/client/test_client.py+1 added-1 removed
35 unmodified lines
36 assert response.encoding == "iso-8859-1"37 assert response.request.url == httpcore.URL(url)38 assert response.headers39 assert response.is_redirect is False40 assert repr(response) == "<SyncResponse(200, 'OK')>"40 assert repr(response) == "<Response(200, 'OK')>"414243@threadpool44def test_post(server):
91 unmodified lines