Skip to content
Myr

Proper warning level of deprecation notice (#908)

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

This enables us to control emitted messages via the PYTHONWARNINGS environment variable or by -W option.

authored by Nicholas Guriev · committed by GitHub · parent c6872e1 · Browse files · 1 file+4 added−2 removed
This commit

State

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

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:httpx/_models.py+4 added-2 removed
874 unmodified lines
875 @property876 def stream(self): # type: ignore877 warnings.warn( # pragma: nocover878 "Response.stream() is due to be deprecated. "879 "Use Response.aiter_bytes() instead."879 "Use Response.aiter_bytes() instead.",880 DeprecationWarning,881 )882 return self.aiter_bytes # pragma: nocover883884 @property885 def raw(self): # type: ignore886 warnings.warn( # pragma: nocover887 "Response.raw() is due to be deprecated. "887 "Use Response.aiter_raw() instead."888 "Use Response.aiter_raw() instead.",889 DeprecationWarning,890 )891 return self.aiter_raw # pragma: nocover892893 def read(self) -> bytes:
309 unmodified lines