@@ -4,6 +4,45 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) .
66
7+ ## 0.13.0 (April 21st, 2021)
8+
9+ The 0.13 release updates the core API in order to match the HTTPX Transport API,
10+ introduced in HTTPX 0.18 onwards.
11+
12+ An example of making requests with the new interface is:
13+
14+ ``` python
15+ with httpcore.SyncConnectionPool() as http:
16+ status_code, headers, stream, extensions = http.handle_request(
17+ method = b ' GET' ,
18+ url = (b ' https' , b ' example.org' , 443 , b ' /' ),
19+ headers = [(b ' host' , b ' example.org' ), (b ' user-agent' , b ' httpcore' )]
20+ stream = httpcore.ByteStream(b ' ' ),
21+ extensions = {}
22+ )
23+ body = stream.read()
24+ print (status_code, body)
25+ ```
26+
27+ ### Changed
28+
29+ - The ` .request() ` method is now ` handle_request() ` . (Pull #296 )
30+ - The ` .arequest() ` method is now ` .handle_async_request() ` . (Pull #296 )
31+ - The ` headers ` argument is no longer optional. (Pull #296 )
32+ - The ` stream ` argument is no longer optional. (Pull #296 )
33+ - The ` ext ` argument is now named ` extensions ` , and is no longer optional. (Pull #296 )
34+ - The ` "reason" ` extension keyword is now named ` "reason_phrase" ` . (Pull #296 )
35+ - The ` "reason_phrase" ` and ` "http_version" ` extensions now use byte strings for their values. (Pull #296 )
36+ - The ` httpcore.PlainByteStream() ` class becomes ` httpcore.ByteStream() ` . (Pull #296 )
37+
38+ ### Added
39+
40+ - Streams now support a ` .read() ` interface. (Pull #296 )
41+
42+ ### Fixed
43+
44+ - Task cancelation no longer leaks connections from the connection pool. (Pull #305 )
45+
746## 0.12.3 (December 7th, 2020)
847
948### Fixed
0 commit comments