httpcorexyz 1.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. httpcorexyz-1.0.10/.gitignore +12 -0
  2. httpcorexyz-1.0.10/CHANGELOG.md +482 -0
  3. httpcorexyz-1.0.10/LICENSE.md +27 -0
  4. httpcorexyz-1.0.10/PKG-INFO +634 -0
  5. httpcorexyz-1.0.10/README.md +113 -0
  6. httpcorexyz-1.0.10/httpcorexyz/__init__.py +154 -0
  7. httpcorexyz-1.0.10/httpcorexyz/_api.py +94 -0
  8. httpcorexyz-1.0.10/httpcorexyz/_async/__init__.py +39 -0
  9. httpcorexyz-1.0.10/httpcorexyz/_async/connection.py +222 -0
  10. httpcorexyz-1.0.10/httpcorexyz/_async/connection_pool.py +420 -0
  11. httpcorexyz-1.0.10/httpcorexyz/_async/http11.py +379 -0
  12. httpcorexyz-1.0.10/httpcorexyz/_async/http2.py +592 -0
  13. httpcorexyz-1.0.10/httpcorexyz/_async/http_proxy.py +367 -0
  14. httpcorexyz-1.0.10/httpcorexyz/_async/interfaces.py +137 -0
  15. httpcorexyz-1.0.10/httpcorexyz/_async/socks_proxy.py +341 -0
  16. httpcorexyz-1.0.10/httpcorexyz/_backends/__init__.py +0 -0
  17. httpcorexyz-1.0.10/httpcorexyz/_backends/anyio.py +146 -0
  18. httpcorexyz-1.0.10/httpcorexyz/_backends/auto.py +52 -0
  19. httpcorexyz-1.0.10/httpcorexyz/_backends/base.py +101 -0
  20. httpcorexyz-1.0.10/httpcorexyz/_backends/mock.py +143 -0
  21. httpcorexyz-1.0.10/httpcorexyz/_backends/sync.py +241 -0
  22. httpcorexyz-1.0.10/httpcorexyz/_backends/trio.py +159 -0
  23. httpcorexyz-1.0.10/httpcorexyz/_exceptions.py +81 -0
  24. httpcorexyz-1.0.10/httpcorexyz/_models.py +516 -0
  25. httpcorexyz-1.0.10/httpcorexyz/_ssl.py +9 -0
  26. httpcorexyz-1.0.10/httpcorexyz/_sync/__init__.py +39 -0
  27. httpcorexyz-1.0.10/httpcorexyz/_sync/connection.py +222 -0
  28. httpcorexyz-1.0.10/httpcorexyz/_sync/connection_pool.py +420 -0
  29. httpcorexyz-1.0.10/httpcorexyz/_sync/http11.py +379 -0
  30. httpcorexyz-1.0.10/httpcorexyz/_sync/http2.py +592 -0
  31. httpcorexyz-1.0.10/httpcorexyz/_sync/http_proxy.py +367 -0
  32. httpcorexyz-1.0.10/httpcorexyz/_sync/interfaces.py +137 -0
  33. httpcorexyz-1.0.10/httpcorexyz/_sync/socks_proxy.py +341 -0
  34. httpcorexyz-1.0.10/httpcorexyz/_synchronization.py +318 -0
  35. httpcorexyz-1.0.10/httpcorexyz/_trace.py +107 -0
  36. httpcorexyz-1.0.10/httpcorexyz/_utils.py +37 -0
  37. httpcorexyz-1.0.10/httpcorexyz/py.typed +0 -0
  38. httpcorexyz-1.0.10/pyproject.toml +128 -0
  39. httpcorexyz-1.0.10/tests/__init__.py +0 -0
  40. httpcorexyz-1.0.10/tests/_async/__init__.py +0 -0
  41. httpcorexyz-1.0.10/tests/_async/test_connection.py +381 -0
  42. httpcorexyz-1.0.10/tests/_async/test_connection_pool.py +837 -0
  43. httpcorexyz-1.0.10/tests/_async/test_http11.py +380 -0
  44. httpcorexyz-1.0.10/tests/_async/test_http2.py +382 -0
  45. httpcorexyz-1.0.10/tests/_async/test_http_proxy.py +278 -0
  46. httpcorexyz-1.0.10/tests/_async/test_integration.py +51 -0
  47. httpcorexyz-1.0.10/tests/_async/test_socks_proxy.py +197 -0
  48. httpcorexyz-1.0.10/tests/_sync/__init__.py +0 -0
  49. httpcorexyz-1.0.10/tests/_sync/test_connection.py +381 -0
  50. httpcorexyz-1.0.10/tests/_sync/test_connection_pool.py +837 -0
  51. httpcorexyz-1.0.10/tests/_sync/test_http11.py +380 -0
  52. httpcorexyz-1.0.10/tests/_sync/test_http2.py +382 -0
  53. httpcorexyz-1.0.10/tests/_sync/test_http_proxy.py +278 -0
  54. httpcorexyz-1.0.10/tests/_sync/test_integration.py +51 -0
  55. httpcorexyz-1.0.10/tests/_sync/test_socks_proxy.py +197 -0
  56. httpcorexyz-1.0.10/tests/benchmark/client.py +194 -0
  57. httpcorexyz-1.0.10/tests/benchmark/server.py +39 -0
  58. httpcorexyz-1.0.10/tests/concurrency.py +41 -0
  59. httpcorexyz-1.0.10/tests/test_api.py +20 -0
  60. httpcorexyz-1.0.10/tests/test_cancellations.py +249 -0
  61. httpcorexyz-1.0.10/tests/test_httpcore_compat.py +42 -0
  62. httpcorexyz-1.0.10/tests/test_models.py +191 -0
@@ -0,0 +1,12 @@
1
+ *.pyc
2
+ .coverage
3
+ .pytest_cache/
4
+ .mypy_cache/
5
+ __pycache__/
6
+ htmlcov/
7
+ site/
8
+ *.egg-info/
9
+ venv*/
10
+ .python-version
11
+ build/
12
+ dist/
@@ -0,0 +1,482 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+
7
+ ## Version 1.0.10 (April 11, 2026) FIRST RELEASE AS HTTPCOREXYZ
8
+
9
+ - Renamed to httpcorexyz
10
+
11
+ - Fix `max_keepalive_connections` not being properly handled. (#1000)
12
+
13
+ ## Version 1.0.9 (April 24th, 2025)
14
+
15
+ - Resolve https://github.com/advisories/GHSA-vqfr-h8mv-ghfj with h11 dependency update. (#1008)
16
+
17
+ ## Version 1.0.8 (April 11th, 2025)
18
+
19
+ - Fix `AttributeError` when importing on Python 3.14. (#1005)
20
+
21
+ ## Version 1.0.7 (November 15th, 2024)
22
+
23
+ - Support `proxy=…` configuration on `ConnectionPool()`. (#974)
24
+
25
+ ## Version 1.0.6 (October 1st, 2024)
26
+
27
+ - Relax `trio` dependency pinning. (#956)
28
+ - Handle `trio` raising `NotImplementedError` on unsupported platforms. (#955)
29
+ - Handle mapping `ssl.SSLError` to `httpcore.ConnectError`. (#918)
30
+
31
+ ## 1.0.5 (March 27th, 2024)
32
+
33
+ - Handle `EndOfStream` exception for anyio backend. (#899)
34
+ - Allow trio `0.25.*` series in package dependancies. (#903)
35
+
36
+ ## 1.0.4 (February 21st, 2024)
37
+
38
+ - Add `target` request extension. (#888)
39
+ - Fix support for connection `Upgrade` and `CONNECT` when some data in the stream has been read. (#882)
40
+
41
+ ## 1.0.3 (February 13th, 2024)
42
+
43
+ - Fix support for async cancellations. (#880)
44
+ - Fix trace extension when used with socks proxy. (#849)
45
+ - Fix SSL context for connections using the "wss" scheme (#869)
46
+
47
+ ## 1.0.2 (November 10th, 2023)
48
+
49
+ - Fix `float("inf")` timeouts in `Event.wait` function. (#846)
50
+
51
+ ## 1.0.1 (November 3rd, 2023)
52
+
53
+ - Fix pool timeout to account for the total time spent retrying. (#823)
54
+ - Raise a neater RuntimeError when the correct async deps are not installed. (#826)
55
+ - Add support for synchronous TLS-in-TLS streams. (#840)
56
+
57
+ ## 1.0.0 (October 6th, 2023)
58
+
59
+ From version 1.0 our async support is now optional, as the package has minimal dependencies by default.
60
+
61
+ For async support use either `pip install 'httpcore[asyncio]'` or `pip install 'httpcore[trio]'`.
62
+
63
+ The project versioning policy is now explicitly governed by SEMVER. See https://semver.org/.
64
+
65
+ - Async support becomes fully optional. (#809)
66
+ - Add support for Python 3.12. (#807)
67
+
68
+ ## 0.18.0 (September 8th, 2023)
69
+
70
+ - Add support for HTTPS proxies. (#745, #786)
71
+ - Drop Python 3.7 support. (#727)
72
+ - Handle `sni_hostname` extension with SOCKS proxy. (#774)
73
+ - Handle HTTP/1.1 half-closed connections gracefully. (#641)
74
+ - Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#762)
75
+
76
+ ## 0.17.3 (July 5th, 2023)
77
+
78
+ - Support async cancellations, ensuring that the connection pool is left in a clean state when cancellations occur. (#726)
79
+ - The networking backend interface has [been added to the public API](https://www.encode.io/httpcore/network-backends). Some classes which were previously private implementation detail are now part of the top-level public API. (#699)
80
+ - Graceful handling of HTTP/2 GoAway frames, with requests being transparently retried on a new connection. (#730)
81
+ - Add exceptions when a synchronous `trace callback` is passed to an asynchronous request or an asynchronous `trace callback` is passed to a synchronous request. (#717)
82
+ - Drop Python 3.7 support. (#727)
83
+
84
+ ## 0.17.2 (May 23th, 2023)
85
+
86
+ - Add `socket_options` argument to `ConnectionPool` and `HTTProxy` classes. (#668)
87
+ - Improve logging with per-module logger names. (#690)
88
+ - Add `sni_hostname` request extension. (#696)
89
+ - Resolve race condition during import of `anyio` package. (#692)
90
+ - Enable TCP_NODELAY for all synchronous sockets. (#651)
91
+
92
+ ## 0.17.1 (May 17th, 2023)
93
+
94
+ - If 'retries' is set, then allow retries if an SSL handshake error occurs. (#669)
95
+ - Improve correctness of tracebacks on network exceptions, by raising properly chained exceptions. (#678)
96
+ - Prevent connection-hanging behaviour when HTTP/2 connections are closed by a server-sent 'GoAway' frame. (#679)
97
+ - Fix edge-case exception when removing requests from the connection pool. (#680)
98
+ - Fix pool timeout edge-case. (#688)
99
+
100
+ ## 0.17.0 (March 16th, 2023)
101
+
102
+ - Add DEBUG level logging. (#648)
103
+ - Respect HTTP/2 max concurrent streams when settings updates are sent by server. (#652)
104
+ - Increase the allowable HTTP header size to 100kB. (#647)
105
+ - Add `retries` option to SOCKS proxy classes. (#643)
106
+
107
+ ## 0.16.3 (December 20th, 2022)
108
+
109
+ - Allow `ws` and `wss` schemes. Allows us to properly support websocket upgrade connections. (#625)
110
+ - Forwarding HTTP proxies use a connection-per-remote-host. Required by some proxy implementations. (#637)
111
+ - Don't raise `RuntimeError` when closing a connection pool with active connections. Removes some error cases when cancellations are used. (#631)
112
+ - Lazy import `anyio`, so that it's no longer a hard dependancy, and isn't imported if unused. (#639)
113
+
114
+ ## 0.16.2 (November 25th, 2022)
115
+
116
+ - Revert 'Fix async cancellation behaviour', which introduced race conditions. (#627)
117
+ - Raise `RuntimeError` if attempting to us UNIX domain sockets on Windows. (#619)
118
+
119
+ ## 0.16.1 (November 17th, 2022)
120
+
121
+ - Fix HTTP/1.1 interim informational responses, such as "100 Continue". (#605)
122
+
123
+ ## 0.16.0 (October 11th, 2022)
124
+
125
+ - Support HTTP/1.1 informational responses. (#581)
126
+ - Fix async cancellation behaviour. (#580)
127
+ - Support `h11` 0.14. (#579)
128
+
129
+ ## 0.15.0 (May 17th, 2022)
130
+
131
+ - Drop Python 3.6 support (#535)
132
+ - Ensure HTTP proxy CONNECT requests include `timeout` configuration. (#506)
133
+ - Switch to explicit `typing.Optional` for type hints. (#513)
134
+ - For `trio` map OSError exceptions to `ConnectError`. (#543)
135
+
136
+ ## 0.14.7 (February 4th, 2022)
137
+
138
+ - Requests which raise a PoolTimeout need to be removed from the pool queue. (#502)
139
+ - Fix AttributeError that happened when Socks5Connection were terminated. (#501)
140
+
141
+ ## 0.14.6 (February 1st, 2022)
142
+
143
+ - Fix SOCKS support for `http://` URLs. (#492)
144
+ - Resolve race condition around exceptions during streaming a response. (#491)
145
+
146
+ ## 0.14.5 (January 18th, 2022)
147
+
148
+ - SOCKS proxy support. (#478)
149
+ - Add proxy_auth argument to HTTPProxy. (#481)
150
+ - Improve error message on 'RemoteProtocolError' exception when server disconnects without sending a response. (#479)
151
+
152
+ ## 0.14.4 (January 5th, 2022)
153
+
154
+ - Support HTTP/2 on HTTPS tunnelling proxies. (#468)
155
+ - Fix proxy headers missing on HTTP forwarding. (#456)
156
+ - Only instantiate SSL context if required. (#457)
157
+ - More robust HTTP/2 handling. (#253, #439, #440, #441)
158
+
159
+ ## 0.14.3 (November 17th, 2021)
160
+
161
+ - Fix race condition when removing closed connections from the pool. (#437)
162
+
163
+ ## 0.14.2 (November 16th, 2021)
164
+
165
+ - Failed connections no longer remain in the pool. (Pull #433)
166
+
167
+ ## 0.14.1 (November 12th, 2021)
168
+
169
+ - `max_connections` becomes optional. (Pull #429)
170
+ - `certifi` is now included in the install dependancies. (Pull #428)
171
+ - `h2` is now strictly optional. (Pull #428)
172
+
173
+ ## 0.14.0 (November 11th, 2021)
174
+
175
+ The 0.14 release is a complete reworking of `httpcore`, comprehensively addressing some underlying issues in the connection pooling, as well as substantially redesigning the API to be more user friendly.
176
+
177
+ Some of the lower-level API design also makes the components more easily testable in isolation, and the package now has 100% test coverage.
178
+
179
+ See [discussion #419](https://github.com/encode/httpcore/discussions/419) for a little more background.
180
+
181
+ There's some other neat bits in there too, such as the "trace" extension, which gives a hook into inspecting the internal events that occur during the request/response cycle. This extension is needed for the HTTPX cli, in order to...
182
+
183
+ * Log the point at which the connection is established, and the IP/port on which it is made.
184
+ * Determine if the outgoing request should log as HTTP/1.1 or HTTP/2, rather than having to assume it's HTTP/2 if the --http2 flag was passed. (Which may not actually be true.)
185
+ * Log SSL version info / certificate info.
186
+
187
+ Note that `curio` support is not currently available in 0.14.0. If you're using `httpcore` with `curio` please get in touch, so we can assess if we ought to prioritize it as a feature or not.
188
+
189
+ ## 0.13.7 (September 13th, 2021)
190
+
191
+ - Fix broken error messaging when URL scheme is missing, or a non HTTP(S) scheme is used. (Pull #403)
192
+
193
+ ## 0.13.6 (June 15th, 2021)
194
+
195
+ ### Fixed
196
+
197
+ - Close sockets when read or write timeouts occur. (Pull #365)
198
+
199
+ ## 0.13.5 (June 14th, 2021)
200
+
201
+ ### Fixed
202
+
203
+ - Resolved niggles with AnyIO EOF behaviours. (Pull #358, #362)
204
+
205
+ ## 0.13.4 (June 9th, 2021)
206
+
207
+ ### Added
208
+
209
+ - Improved error messaging when URL scheme is missing, or a non HTTP(S) scheme is used. (Pull #354)
210
+
211
+ ### Fixed
212
+
213
+ - Switched to `anyio` as the default backend implementation when running with `asyncio`. Resolves some awkward [TLS timeout issues](https://github.com/encode/httpx/discussions/1511).
214
+
215
+ ## 0.13.3 (May 6th, 2021)
216
+
217
+ ### Added
218
+
219
+ - Support HTTP/2 prior knowledge, using `httpcore.SyncConnectionPool(http1=False)`. (Pull #333)
220
+
221
+ ### Fixed
222
+
223
+ - Handle cases where environment does not provide `select.poll` support. (Pull #331)
224
+
225
+ ## 0.13.2 (April 29th, 2021)
226
+
227
+ ### Added
228
+
229
+ - Improve error message for specific case of `RemoteProtocolError` where server disconnects without sending a response. (Pull #313)
230
+
231
+ ## 0.13.1 (April 28th, 2021)
232
+
233
+ ### Fixed
234
+
235
+ - More resiliant testing for closed connections. (Pull #311)
236
+ - Don't raise exceptions on ungraceful connection closes. (Pull #310)
237
+
238
+ ## 0.13.0 (April 21st, 2021)
239
+
240
+ The 0.13 release updates the core API in order to match the HTTPX Transport API,
241
+ introduced in HTTPX 0.18 onwards.
242
+
243
+ An example of making requests with the new interface is:
244
+
245
+ ```python
246
+ with httpcore.SyncConnectionPool() as http:
247
+ status_code, headers, stream, extensions = http.handle_request(
248
+ method=b'GET',
249
+ url=(b'https', b'example.org', 443, b'/'),
250
+ headers=[(b'host', b'example.org'), (b'user-agent', b'httpcore')]
251
+ stream=httpcore.ByteStream(b''),
252
+ extensions={}
253
+ )
254
+ body = stream.read()
255
+ print(status_code, body)
256
+ ```
257
+
258
+ ### Changed
259
+
260
+ - The `.request()` method is now `handle_request()`. (Pull #296)
261
+ - The `.arequest()` method is now `.handle_async_request()`. (Pull #296)
262
+ - The `headers` argument is no longer optional. (Pull #296)
263
+ - The `stream` argument is no longer optional. (Pull #296)
264
+ - The `ext` argument is now named `extensions`, and is no longer optional. (Pull #296)
265
+ - The `"reason"` extension keyword is now named `"reason_phrase"`. (Pull #296)
266
+ - The `"reason_phrase"` and `"http_version"` extensions now use byte strings for their values. (Pull #296)
267
+ - The `httpcore.PlainByteStream()` class becomes `httpcore.ByteStream()`. (Pull #296)
268
+
269
+ ### Added
270
+
271
+ - Streams now support a `.read()` interface. (Pull #296)
272
+
273
+ ### Fixed
274
+
275
+ - Task cancellation no longer leaks connections from the connection pool. (Pull #305)
276
+
277
+ ## 0.12.3 (December 7th, 2020)
278
+
279
+ ### Fixed
280
+
281
+ - Abort SSL connections on close rather than waiting for remote EOF when using `asyncio`. (Pull #167)
282
+ - Fix exception raised in case of connect timeouts when using the `anyio` backend. (Pull #236)
283
+ - Fix `Host` header precedence for `:authority` in HTTP/2. (Pull #241, #243)
284
+ - Handle extra edge case when detecting for socket readability when using `asyncio`. (Pull #242, #244)
285
+ - Fix `asyncio` SSL warning when using proxy tunneling. (Pull #249)
286
+
287
+ ## 0.12.2 (November 20th, 2020)
288
+
289
+ ### Fixed
290
+
291
+ - Properly wrap connect errors on the asyncio backend. (Pull #235)
292
+ - Fix `ImportError` occurring on Python 3.9 when using the HTTP/1.1 sync client in a multithreaded context. (Pull #237)
293
+
294
+ ## 0.12.1 (November 7th, 2020)
295
+
296
+ ### Added
297
+
298
+ - Add connect retries. (Pull #221)
299
+
300
+ ### Fixed
301
+
302
+ - Tweak detection of dropped connections, resolving an issue with open files limits on Linux. (Pull #185)
303
+ - Avoid leaking connections when establishing an HTTP tunnel to a proxy has failed. (Pull #223)
304
+ - Properly wrap OS errors when using `trio`. (Pull #225)
305
+
306
+ ## 0.12.0 (October 6th, 2020)
307
+
308
+ ### Changed
309
+
310
+ - HTTP header casing is now preserved, rather than always sent in lowercase. (#216 and python-hyper/h11#104)
311
+
312
+ ### Added
313
+
314
+ - Add Python 3.9 to officially supported versions.
315
+
316
+ ### Fixed
317
+
318
+ - Gracefully handle a stdlib asyncio bug when a connection is closed while it is in a paused-for-reading state. (#201)
319
+
320
+ ## 0.11.1 (September 28nd, 2020)
321
+
322
+ ### Fixed
323
+
324
+ - Add await to async semaphore release() coroutine (#197)
325
+ - Drop incorrect curio classifier (#192)
326
+
327
+ ## 0.11.0 (September 22nd, 2020)
328
+
329
+ The Transport API with 0.11.0 has a couple of significant changes.
330
+
331
+ Firstly we've moved changed the request interface in order to allow extensions, which will later enable us to support features
332
+ such as trailing headers, HTTP/2 server push, and CONNECT/Upgrade connections.
333
+
334
+ The interface changes from:
335
+
336
+ ```python
337
+ def request(method, url, headers, stream, timeout):
338
+ return (http_version, status_code, reason, headers, stream)
339
+ ```
340
+
341
+ To instead including an optional dictionary of extensions on the request and response:
342
+
343
+ ```python
344
+ def request(method, url, headers, stream, ext):
345
+ return (status_code, headers, stream, ext)
346
+ ```
347
+
348
+ Having an open-ended extensions point will allow us to add later support for various optional features, that wouldn't otherwise be supported without these API changes.
349
+
350
+ In particular:
351
+
352
+ * Trailing headers support.
353
+ * HTTP/2 Server Push
354
+ * sendfile.
355
+ * Exposing raw connection on CONNECT, Upgrade, HTTP/2 bi-di streaming.
356
+ * Exposing debug information out of the API, including template name, template context.
357
+
358
+ Currently extensions are limited to:
359
+
360
+ * request: `timeout` - Optional. Timeout dictionary.
361
+ * response: `http_version` - Optional. Include the HTTP version used on the response.
362
+ * response: `reason` - Optional. Include the reason phrase used on the response. Only valid with HTTP/1.*.
363
+
364
+ See https://github.com/encode/httpx/issues/1274#issuecomment-694884553 for the history behind this.
365
+
366
+ Secondly, the async version of `request` is now namespaced as `arequest`.
367
+
368
+ This allows concrete transports to support both sync and async implementations on the same class.
369
+
370
+ ### Added
371
+
372
+ - Add curio support. (Pull #168)
373
+ - Add anyio support, with `backend="anyio"`. (Pull #169)
374
+
375
+ ### Changed
376
+
377
+ - Update the Transport API to use 'ext' for optional extensions. (Pull #190)
378
+ - Update the Transport API to use `.request` and `.arequest` so implementations can support both sync and async. (Pull #189)
379
+
380
+ ## 0.10.2 (August 20th, 2020)
381
+
382
+ ### Added
383
+
384
+ - Added Unix Domain Socket support. (Pull #139)
385
+
386
+ ### Fixed
387
+
388
+ - Always include the port on proxy CONNECT requests. (Pull #154)
389
+ - Fix `max_keepalive_connections` configuration. (Pull #153)
390
+ - Fixes behaviour in HTTP/1.1 where server disconnects can be used to signal the end of the response body. (Pull #164)
391
+
392
+ ## 0.10.1 (August 7th, 2020)
393
+
394
+ - Include `max_keepalive_connections` on `AsyncHTTPProxy`/`SyncHTTPProxy` classes.
395
+
396
+ ## 0.10.0 (August 7th, 2020)
397
+
398
+ The most notable change in the 0.10.0 release is that HTTP/2 support is now fully optional.
399
+
400
+ Use either `pip install httpcore` for HTTP/1.1 support only, or `pip install httpcore[http2]` for HTTP/1.1 and HTTP/2 support.
401
+
402
+ ### Added
403
+
404
+ - HTTP/2 support becomes optional. (Pull #121, #130)
405
+ - Add `local_address=...` support. (Pull #100, #134)
406
+ - Add `PlainByteStream`, `IteratorByteStream`, `AsyncIteratorByteStream`. The `AsyncByteSteam` and `SyncByteStream` classes are now pure interface classes. (#133)
407
+ - Add `LocalProtocolError`, `RemoteProtocolError` exceptions. (Pull #129)
408
+ - Add `UnsupportedProtocol` exception. (Pull #128)
409
+ - Add `.get_connection_info()` method. (Pull #102, #137)
410
+ - Add better TRACE logs. (Pull #101)
411
+
412
+ ### Changed
413
+
414
+ - `max_keepalive` is deprecated in favour of `max_keepalive_connections`. (Pull #140)
415
+
416
+ ### Fixed
417
+
418
+ - Improve handling of server disconnects. (Pull #112)
419
+
420
+ ## 0.9.1 (May 27th, 2020)
421
+
422
+ ### Fixed
423
+
424
+ - Proper host resolution for sync case, including IPv6 support. (Pull #97)
425
+ - Close outstanding connections when connection pool is closed. (Pull #98)
426
+
427
+ ## 0.9.0 (May 21th, 2020)
428
+
429
+ ### Changed
430
+
431
+ - URL port becomes an `Optional[int]` instead of `int`. (Pull #92)
432
+
433
+ ### Fixed
434
+
435
+ - Honor HTTP/2 max concurrent streams settings. (Pull #89, #90)
436
+ - Remove incorrect debug log. (Pull #83)
437
+
438
+ ## 0.8.4 (May 11th, 2020)
439
+
440
+ ### Added
441
+
442
+ - Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables
443
+ and TRACE level logging. (Pull #79)
444
+
445
+ ### Fixed
446
+
447
+ - Reuse of connections on HTTP/2 in close concurrency situations. (Pull #81)
448
+
449
+ ## 0.8.3 (May 6rd, 2020)
450
+
451
+ ### Fixed
452
+
453
+ - Include `Host` and `Accept` headers on proxy "CONNECT" requests.
454
+ - De-duplicate any headers also contained in proxy_headers.
455
+ - HTTP/2 flag not being passed down to proxy connections.
456
+
457
+ ## 0.8.2 (May 3rd, 2020)
458
+
459
+ ### Fixed
460
+
461
+ - Fix connections using proxy forwarding requests not being added to the
462
+ connection pool properly. (Pull #70)
463
+
464
+ ## 0.8.1 (April 30th, 2020)
465
+
466
+ ### Changed
467
+
468
+ - Allow inherintance of both `httpcore.AsyncByteStream`, `httpcore.SyncByteStream` without type conflicts.
469
+
470
+ ## 0.8.0 (April 30th, 2020)
471
+
472
+ ### Fixed
473
+
474
+ - Fixed tunnel proxy support.
475
+
476
+ ### Added
477
+
478
+ - New `TimeoutException` base class.
479
+
480
+ ## 0.7.0 (March 5th, 2020)
481
+
482
+ - First integration with HTTPX.
@@ -0,0 +1,27 @@
1
+ Copyright © 2020, [Encode OSS Ltd](https://www.encode.io/).
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ * Neither the name of the copyright holder nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.