httpx v0.10.0 Release Notes
Release Date: 2019-12-29 // over 4 years ago-
๐ The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces.
In particular with streaming responses the
response.read()
method becomesresponse.aread()
, and theresponse.close()
method becomesresponse.aclose()
.If following redirects explicitly the
response.next()
method becomesresponse.anext()
.๐ Fixed
- End HTTP/2 streams immediately on no-body requests, rather than sending an empty body message. (Pull #682)
- ๐ Improve typing for
Response.request
: switch fromOptional[Request]
toRequest
. (Pull #666) Response.elapsed
now reflects the entire download time. (Pull #687, #692)
๐ Changed
- โ Added
AsyncClient
as a synonym forClient
. (Pull #680) - Switch to
response.aread()
for conditionally reading streaming responses. (Pull #674) - Switch to
response.aclose()
andclient.aclose()
for explicit closing. (Pull #674, #675) - Switch to
response.anext()
for resolving the next redirect response. (Pull #676)
โ Removed
- โ When using a client instance, the per-request usage of
verify
,cert
, andtrust_env
have now escalated from raising a warning to raising an error. You should set these arguments on the client instead. (Pull #617) - โ Removed the undocumented
request.read()
, since end users should not require it.