Skip to content
Myr

CHANGELOG.md

This file

Path

CHANGELOG.md

1,125 lines · 51.5 KiB · Markdown

Last changed by

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

History of this file

Take it

The walk stopped after 200 commits: lines older than ab8177c point at it.

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 1–6why, one step back
1# Changelog
23All notable changes to this project will be documented in this file.45The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).6

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 7why, one step back
7## 0.28.0 (28th November, 2024)

Introduce new `SSLContext` API & escalate deprecations. (#3319)Tom Christiebefore adoption8e36f2b

line 8why, one step back
8

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 9why, one step back
9The 0.28 release includes a limited set of deprecations.

Introduce new `SSLContext` API & escalate deprecations. (#3319)Tom Christiebefore adoption8e36f2b

line 10why, one step back
10

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 11why, one step back
11**Deprecations**:

Graceful upgrade path for 0.28. (#3394)Tom Christiebefore adoption1805ee0

line 12why, one step back
12

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 13why, one step back
13We are working towards a simplified SSL configuration API.

Graceful upgrade path for 0.28. (#3394)Tom Christiebefore adoption1805ee0

line 14why, one step back
14

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 15why, one step back
15*For users of the standard `verify=True` or `verify=False` cases, or `verify=<ssl_context>` case this should require no changes. The following cases have been deprecated...*

Graceful upgrade path for 0.28. (#3394)Tom Christiebefore adoption1805ee0

line 16why, one step back
16

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

lines 17–18why, one step back
17* The `verify` argument as a string argument is now deprecated and will raise warnings.
18* The `cert` argument is now deprecated and will raise warnings.

Graceful upgrade path for 0.28. (#3394)Tom Christiebefore adoption1805ee0

line 19why, one step back
19

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 20why, one step back
20Our revised [SSL documentation](docs/advanced/ssl.md) covers how to implement the same behaviour with a more constrained API.

Graceful upgrade path for 0.28. (#3394)Tom Christiebefore adoption1805ee0

lines 21–23why, one step back
21
22**The following changes are also included**:23

Introduce new `SSLContext` API & escalate deprecations. (#3319)Tom Christiebefore adoption8e36f2b

lines 24–25why, one step back
24* The deprecated `proxies` argument has now been removed.
25* The deprecated `app` argument has now been removed.

Version 0.28.0. (#3419)Tom Christiebefore adoption80960fa

line 26why, one step back
26* JSON request bodies use a compact representation. (#3363)

Update CHANGELOG.md (#3374)Tom Christiebefore adoption5440381

line 27why, one step back
27* Review URL percent escape sets, based on WHATWG spec. (#3371, #3373)

made dependencies on certifi and httpcore only load when required (#3377)Joe Marshallbefore adoptione9cabc8

line 28why, one step back
28* Ensure `certifi` and `httpcore` are only imported if required. (#3377)

add socks5h proxy support (#3178)Bin Liubefore adoption12be5c4

line 29why, one step back
29* Treat `socks5h` as a valid proxy scheme. (#3178)

Cleanup `Request` method parameter. (#3378)Tom Christiebefore adoption6622553

line 30why, one step back
30* Cleanup `Request()` method signature in line with `client.request()` and `httpx.request()`. (#3378)

Introduce new `SSLContext` API & escalate deprecations. (#3319)Tom Christiebefore adoption8e36f2b

line 31why, one step back
31

Reintroduce `URLTypes`. (#3288)Tom Christiebefore adoption609df7e

lines 32–37why, one step back
32## 0.27.2 (27th August, 2024)
3334### Fixed3536* Reintroduced supposedly-private `URLTypes` shortcut. (#2673)37

Update CHANGELOG for 0.27.1 release date. (#3285)Tom Christiebefore adoption1d6b663

line 38why, one step back
38## 0.27.1 (27th August, 2024)

Add missing argument (#3023)Kar Petrosyanbefore adoption1a66014

line 39why, one step back
39

Reintroduce `URLTypes`. (#3288)Tom Christiebefore adoption609df7e

line 40why, one step back
40### Added

Add support for zstd decoding (#3139)Michiel W. Beijenbefore adoption392dbe4

lines 41–43why, one step back
41
42* Support for `zstd` content decoding using the python `zstandard` package is added. Installable using `httpx[zstd]`. (#3139)43

Use more permissible types in ASGIApp (#3109)Jon Finertybefore adoption4de1370

lines 44–45why, one step back
44### Fixed
45

Improve InvalidURL error message. (#3250)Tom Christiebefore adoption7c0cda1

line 46why, one step back
46* Improved error messaging for `InvalidURL` exceptions. (#3250)

Use more permissible types in ASGIApp (#3109)Jon Finertybefore adoption4de1370

lines 47–48why, one step back
47* Fix `app` type signature in `ASGITransport`. (#3109)
48

Version 0.27.0 (#3095)Tom Christiebefore adoption326b943

lines 49–50why, one step back
49## 0.27.0 (21st February, 2024)
50

Deprecate `app=...` in favor of explicit `WSGITransport`/`ASGITransport`. (#3050)Tom Christiebefore adoptioncabd1c0

lines 51–54why, one step back
51### Deprecated
5253* The `app=...` shortcut has been deprecated. Use the explicit style of `transport=httpx.WSGITransport()` or `transport=httpx.ASGITransport()` instead.54

Add missing argument (#3023)Kar Petrosyanbefore adoption1a66014

lines 55–57why, one step back
55### Fixed
5657* Respect the `http1` argument while configuring proxy transports. (#3023)

Fix RFC 2069 mode digest authentication (#3045)Tereza Tomcovabefore adoption99cba6a

line 58why, one step back
58* Fix RFC 2069 mode digest authentication. (#3045)

Add missing argument (#3023)Kar Petrosyanbefore adoption1a66014

line 59why, one step back
59

Version 0.26.0 (#3009)Kar Petrosyanbefore adoption08eff92

line 60why, one step back
60## 0.26.0 (20th December, 2023)

Allow URLs where username or password contains unescaped '@'. (#2986)Tom Christiebefore adoptionb471f01

line 61why, one step back
61

Version 0.26.0 (#3009)Kar Petrosyanbefore adoption08eff92

line 62why, one step back
62### Added

Add the 'proxy' parameter and deprecate 'proxies'. (#2879)Kar Petrosyanbefore adoptionf8981f3

line 63why, one step back
63

Version 0.26.0 (#3009)Kar Petrosyanbefore adoption08eff92

line 64why, one step back
64* The `proxy` argument was added. You should use the `proxy` argument instead of the deprecated `proxies`, or use `mounts=` for more complex configurations. (#2879)

Add the 'proxy' parameter and deprecate 'proxies'. (#2879)Kar Petrosyanbefore adoptionf8981f3

line 65why, one step back
65

Version 0.26.0 (#3009)Kar Petrosyanbefore adoption08eff92

lines 66–69why, one step back
66### Deprecated
6768* The `proxies` argument is now deprecated. It will still continue to work, but it will be removed in the future. (#2879)69

Allow URLs where username or password contains unescaped '@'. (#2986)Tom Christiebefore adoptionb471f01

lines 70–71why, one step back
70### Fixed
71

Version 0.26.0 (#3009)Kar Petrosyanbefore adoption08eff92

line 72why, one step back
72* Fix cases of double escaping of URL path components. Allow / as a safe character in the query portion. (#2990)

Fix environment proxies (#2741)Kar Petrosyanbefore adoption3b9060e

line 73why, one step back
73* Handle `NO_PROXY` envvar cases when a fully qualified URL is supplied as the value. (#2741)

Allow URLs where username or password contains unescaped '@'. (#2986)Tom Christiebefore adoptionb471f01

line 74why, one step back
74* Allow URLs where username or password contains unescaped '@'. (#2986)

Ensure that ASGI 'raw_path' does not include query component of URL. (#2999)Tom Christiebefore adoption90538a3

line 75why, one step back
75* Ensure ASGI `raw_path` does not include URL query component. (#2999)

Update CHANGELOG.md (#3000)Tom Christiebefore adoption2c51edd

line 76why, one step back
76* Ensure `Response.iter_text()` cannot yield empty strings. (#2998)

Allow URLs where username or password contains unescaped '@'. (#2986)Tom Christiebefore adoptionb471f01

line 77why, one step back
77

Version 0.25.2 (#2957)Kar Petrosyanbefore adoptioncc206cf

line 78why, one step back
78## 0.25.2 (24th November, 2023)

Raise ValueError on `Response.encoding` being set after `Response.text` has been accessed (#2852)xzmengbefore adoption59df819

line 79why, one step back
79

add missing type hints to __init__(...) (#2938)Petr Belskiybefore adoption87f39f1

lines 80–83why, one step back
80### Added
8182* Add missing type hints to few `__init__()` methods. (#2938)83

Tidy up headers in CHANGELOG.md (#2925)Tom Christiebefore adoptionfbe35ad

line 84why, one step back
84## 0.25.1 (3rd November, 2023)

Add support for Python 3.12 (#2854)Hugo van Kemenadebefore adoption7c9db49

line 85why, one step back
85

Add missing changelog section (#2943)Kar Petrosyanbefore adoptionc51e046

lines 86–87why, one step back
86### Added
87

Add support for Python 3.12 (#2854)Hugo van Kemenadebefore adoption7c9db49

line 88why, one step back
88* Add support for Python 3.12. (#2854)

Support newer versions of httpcore (#2885)Paul Schreiberbefore adoption280a89a

line 89why, one step back
89* Add support for httpcore 1.0 (#2885)

Add support for Python 3.12 (#2854)Hugo van Kemenadebefore adoption7c9db49

line 90why, one step back
90

Raise ValueError on `Response.encoding` being set after `Response.text` has been accessed (#2852)xzmengbefore adoption59df819

lines 91–94why, one step back
91### Fixed
9293* Raise `ValueError` on `Response.encoding` being set after `Response.text` has been accessed. (#2852)94

Version 0.25.1 (#2923)Tom Christiebefore adoptionb07d4e8

line 95why, one step back
95## 0.25.0 (11th September, 2023)

Update changelog with WSGITransport SERVER_PROTOCOL fix (#2711)Peter Lazorchakbefore adoptionf9abbbb

line 96why, one step back
96

Drop support for Python 3.7 (#2813)Iurii Plinerbefore adoptionb40c04d

lines 97–100why, one step back
97### Removed
9899* Drop support for Python 3.7. (#2813)100

Add `socket_options` argument to `httpx.HTTPTransport` class (#2716)Karen Petrosyanbefore adoption7335950

lines 101–102why, one step back
101### Added
102

HTTPS proxies support (#2845)Kar Petrosyanbefore adoptiona54eccc

line 103why, one step back
103* Support HTTPS proxies. (#2845)

Change extensions type (#2803)Kar Petrosyanbefore adoptionadbcd0e

line 104why, one step back
104* Change the type of `Extensions` from `Mapping[Str, Any]` to `MutableMapping[Str, Any]`. (#2803)

Add `socket_options` argument to `httpx.HTTPTransport` class (#2716)Karen Petrosyanbefore adoption7335950

line 105why, one step back
105* Add `socket_options` argument to `httpx.HTTPTransport` and `httpx.AsyncHTTPTransport` classes. (#2716)

Make `raise_for_status` chainable (#2776)Trim21before adoption9415af6

line 106why, one step back
106* The `Response.raise_for_status()` method now returns the response instance. For example: `data = httpx.get('...').raise_for_status().json()`. (#2776)

Add `socket_options` argument to `httpx.HTTPTransport` class (#2716)Karen Petrosyanbefore adoption7335950

line 107why, one step back
107

Update changelog with WSGITransport SERVER_PROTOCOL fix (#2711)Peter Lazorchakbefore adoptionf9abbbb

lines 108–109why, one step back
108### Fixed
109

Fix exception suppression in asgi transport (#2669)Nikbefore adoptiona682f6f

line 110why, one step back
110* Return `500` error response instead of exceptions when `raise_app_exceptions=False` is set on `ASGITransport`. (#2669)

Version 0.25.0 (#2801)Trim21before adoptionc3585a5

lines 111–113why, one step back
111* Ensure all `WSGITransport` environs have a `SERVER_PROTOCOL`. (#2708)
112* Always encode forward slashes as `%2F` in query parameters (#2723)113* Use Mozilla documentation instead of `httpstatuses.com` for HTTP error reference (#2768)

Update changelog with WSGITransport SERVER_PROTOCOL fix (#2711)Peter Lazorchakbefore adoptionf9abbbb

line 114why, one step back
114

Version 0.24.1 (#2702)epenetbefore adoptionfcf1bc7

lines 115–129why, one step back
115## 0.24.1 (17th May, 2023)
116117### Added118119* Provide additional context in some `InvalidURL` exceptions. (#2675)120121### Fixed122123* Fix optional percent-encoding behaviour. (#2671)124* More robust checking for opening upload files in binary mode. (#2630)125* Properly support IP addresses in `NO_PROXY` environment variable. (#2659)126* Set default file for `NetRCAuth()` to `None` to use the stdlib default. (#2667)127* Set logging request lines to INFO level for async requests, in line with sync requests. (#2656)128* Fix which gen-delims need to be escaped for path/query/fragment components in URL. (#2701)129

Version 0.24.0 (#2652)Tom Christiebefore adoption579a3f2

lines 130–136why, one step back
130## 0.24.0 (6th April, 2023)
131132### Changed133134* The logging behaviour has been changed to be more in-line with other standard Python logging usages. We no longer have a custom `TRACE` log level, and we no longer use the `HTTPX_LOG_LEVEL` environment variable to auto-configure logging. We now have a significant amount of `DEBUG` logging available at the network level. Full documentation is available at https://www.python-httpx.org/logging/ (#2547, encode/httpcore#648)135* The `Response.iter_lines()` method now matches the stdlib behaviour and does not include the newline characters. It also resolves a performance issue. (#2423)136* Query parameter encoding switches from using + for spaces and %2F for forward slash, to instead using %20 for spaces and treating forward slash as a safe, unescaped character. This differs from `requests`, but is in line with browser behavior in Chrome, Safari, and Firefox. Both options are RFC valid. (#2543)

Fix broken links in docs/contributing.md and CHANGELOG.md (#3124)Nick Cameronbefore adoption4941b40

line 137why, one step back
137* NetRC authentication is no longer automatically handled, but is instead supported by an explicit `httpx.NetRCAuth()` authentication class. See the documentation at https://www.python-httpx.org/advanced/authentication/#netrc-authentication (#2525)

Version 0.24.0 (#2652)Tom Christiebefore adoption579a3f2

lines 138–142why, one step back
138
139### Removed140141* The `rfc3986` dependancy has been removed. (#2252)142

Version 0.25.1 (#2923)Tom Christiebefore adoptionb07d4e8

line 143why, one step back
143## 0.23.3 (4th January, 2023)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 144–148why, one step back
144
145### Fixed146147* Version 0.23.2 accidentally included stricter type checking on query parameters. This shouldn've have been included in a minor version bump, and is now reverted. (#2523, #2539)148

Version 0.25.1 (#2923)Tom Christiebefore adoptionb07d4e8

line 149why, one step back
149## 0.23.2 (2nd January, 2023)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 150–160why, one step back
150
151### Added152153* Support digest auth nonce counting to avoid multiple auth requests. (#2463)154155### Fixed156157* Multipart file uploads where the file length cannot be determine now use chunked transfer encoding, rather than loading the entire file into memory in order to determine the `Content-Length`. (#2382)158* Raise `TypeError` if content is passed a dict-instance. (#2495)159* Partially revert the API breaking change in 0.23.1, which removed `RawURL`. We continue to expose a `url.raw` property which is now a plain named-tuple. This API is still expected to be deprecated, but we will do so with a major version bump. (#2481)160

Version 0.25.1 (#2923)Tom Christiebefore adoptionb07d4e8

line 161why, one step back
161## 0.23.1 (18th November, 2022)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 162–189why, one step back
162
163**Note**: The 0.23.1 release should have used a proper version bump, rather than a minor point release.164There are API surface area changes that may affect some users.165See the "Removed" section of these release notes for details.166167### Added168169* Support for Python 3.11. (#2420)170* Allow setting an explicit multipart boundary in `Content-Type` header. (#2278)171* Allow `tuple` or `list` for multipart values, not just `list`. (#2355)172* Allow `str` content for multipart upload files. (#2400)173* Support connection upgrades. See https://www.encode.io/httpcore/extensions/#upgrade-requests174175### Fixed176177* Don't drop empty query parameters. (#2354)178179### Removed180181* Upload files *must* always be opened in binary mode. (#2400)182* Drop `.read`/`.aread` from `SyncByteStream`/`AsyncByteStream`. (#2407)183* Drop `RawURL`. (#2241)184185## 0.23.0 (23rd May, 2022)186187### Changed188189* Drop support for Python 3.6. (#2097)

Fix broken links in docs/contributing.md and CHANGELOG.md (#3124)Nick Cameronbefore adoption4941b40

line 190why, one step back
190* Use `utf-8` as the default character set, instead of falling back to `charset-normalizer` for auto-detection. To enable automatic character set detection, see [the documentation](https://www.python-httpx.org/advanced/text-encodings/#using-auto-detection). (#2165)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 191–208why, one step back
191
192### Fixed193194* Fix `URL.copy_with` for some oddly formed URL cases. (#2185)195* Digest authentication should use case-insensitive comparison for determining which algorithm is being used. (#2204)196* Fix console markup escaping in command line client. (#1866)197* When files are used in multipart upload, ensure we always seek to the start of the file. (#2065)198* Ensure that `iter_bytes` never yields zero-length chunks. (#2068)199* Preserve `Authorization` header for redirects that are to the same origin, but are an `http`-to-`https` upgrade. (#2074)200* When responses have binary output, don't print the output to the console in the command line client. Use output like `<16086 bytes of binary data>` instead. (#2076)201* Fix display of `--proxies` argument in the command line client help. (#2125)202* Close responses when task cancellations occur during stream reading. (#2156)203* Fix type error on accessing `.request` on `HTTPError` exceptions. (#2158)204205## 0.22.0 (26th January, 2022)206207### Added208

Fix broken links in docs/contributing.md and CHANGELOG.md (#3124)Nick Cameronbefore adoption4941b40

line 209why, one step back
209* Support for [the SOCKS5 proxy protocol](https://www.python-httpx.org/advanced/proxies/#socks) via [the `socksio` package](https://github.com/sethmlarson/socksio). (#2034)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 210–363why, one step back
210* Support for custom headers in multipart/form-data requests (#1936)
211212### Fixed213214* Don't perform unreliable close/warning on `__del__` with unclosed clients. (#2026)215* Fix `Headers.update(...)` to correctly handle repeated headers (#2038)216217## 0.21.3 (6th January, 2022)218219### Fixed220221* Fix streaming uploads using `SyncByteStream` or `AsyncByteStream`. Regression in 0.21.2. (#2016)222223## 0.21.2 (5th January, 2022)224225### Fixed226227* HTTP/2 support for tunnelled proxy cases. (#2009)228* Improved the speed of large file uploads. (#1948)229230## 0.21.1 (16th November, 2021)231232### Fixed233234* The `response.url` property is now correctly annotated as `URL`, instead of `Optional[URL]`. (#1940)235236## 0.21.0 (15th November, 2021)237238The 0.21.0 release integrates against a newly redesigned `httpcore` backend.239240Both packages ought to automatically update to the required versions, but if you are241seeing any issues, you should ensure that you have `httpx==0.21.*` and `httpcore==0.14.*` installed.242243### Added244245* The command-line client will now display connection information when `-v/--verbose` is used.246* The command-line client will now display server certificate information when `-v/--verbose` is used.247* The command-line client is now able to properly detect if the outgoing request248should be formatted as HTTP/1.1 or HTTP/2, based on the result of the HTTP/2 negotiation.249250### Removed251252* Curio support is no longer currently included. Please get in touch if you require this, so that we can assess priorities.253254## 0.20.0 (13th October, 2021)255256The 0.20.0 release adds an integrated command-line client, and also includes some257design changes. The most notable of these is that redirect responses are no longer258automatically followed, unless specifically requested.259260This design decision prioritises a more explicit approach to redirects, in order261to avoid code that unintentionally issues multiple requests as a result of262misconfigured URLs.263264For example, previously a client configured to send requests to `http://api.github.com/`265would end up sending every API request twice, as each request would be redirected to `https://api.github.com/`.266267If you do want auto-redirect behaviour, you can enable this either by configuring268the client instance with `Client(follow_redirects=True)`, or on a per-request269basis, with `.get(..., follow_redirects=True)`.270271This change is a classic trade-off between convenience and precision, with no "right"272answer. See [discussion #1785](https://github.com/encode/httpx/discussions/1785) for more273context.274275The other major design change is an update to the Transport API, which is the low-level276interface against which requests are sent. Previously this interface used only primitive277datastructures, like so...278279```python280(status_code, headers, stream, extensions) = transport.handle_request(method, url, headers, stream, extensions)281try282 ...283finally:284 stream.close()285```286287Now the interface is much simpler...288289```python290response = transport.handle_request(request)291try292 ...293finally:294 response.close()295```296297### Changed298299* The `allow_redirects` flag is now `follow_redirects` and defaults to `False`.300* The `raise_for_status()` method will now raise an exception for any responses301 except those with 2xx status codes. Previously only 4xx and 5xx status codes302 would result in an exception.303* The low-level transport API changes to the much simpler `response = transport.handle_request(request)`.304* The `client.send()` method no longer accepts a `timeout=...` argument, but the305 `client.build_request()` does. This required by the signature change of the306 Transport API. The request timeout configuration is now stored on the request307 instance, as `request.extensions['timeout']`.308309### Added310311* Added the `httpx` command-line client.312* Response instances now include `.is_informational`, `.is_success`, `.is_redirect`, `.is_client_error`, and `.is_server_error`313 properties for checking 1xx, 2xx, 3xx, 4xx, and 5xx response types. Note that the behaviour of `.is_redirect` is slightly different in that it now returns True for all 3xx responses, in order to allow for a consistent set of properties onto the different HTTP status code types. The `response.has_redirect_location` location may be used to determine responses with properly formed URL redirects.314315### Fixed316317* `response.iter_bytes()` no longer raises a ValueError when called on a response with no content. (Pull #1827)318* The `'wsgi.error'` configuration now defaults to `sys.stderr`, and is corrected to be a `TextIO` interface, not a `BytesIO` interface. Additionally, the WSGITransport now accepts a `wsgi_error` configuration. (Pull #1828)319* Follow the WSGI spec by properly closing the iterable returned by the application. (Pull #1830)320321## 0.19.0 (19th August, 2021)322323### Added324325* Add support for `Client(allow_redirects=<bool>)`. (Pull #1790)326* Add automatic character set detection, when no `charset` is included in the response `Content-Type` header. (Pull #1791)327328### Changed329330* Event hooks are now also called for any additional redirect or auth requests/responses. (Pull #1806)331* Strictly enforce that upload files must be opened in binary mode. (Pull #1736)332* Strictly enforce that client instances can only be opened and closed once, and cannot be re-opened. (Pull #1800)333* Drop `mode` argument from `httpx.Proxy(..., mode=...)`. (Pull #1795)334335## 0.18.2 (17th June, 2021)336337### Added338339* Support for Python 3.10. (Pull #1687)340* Expose `httpx.USE_CLIENT_DEFAULT`, used as the default to `auth` and `timeout` parameters in request methods. (Pull #1634)341* Support [HTTP/2 "prior knowledge"](https://python-hyper.org/projects/hyper-h2/en/v2.3.1/negotiating-http2.html#prior-knowledge), using `httpx.Client(http1=False, http2=True)`. (Pull #1624)342343### Fixed344345* Clean up some cases where warnings were being issued. (Pull #1687)346* Prefer Content-Length over Transfer-Encoding: chunked for content=<file-like> cases. (Pull #1619)347348## 0.18.1 (29th April, 2021)349350### Changed351352* Update brotli support to use the `brotlicffi` package (Pull #1605)353* Ensure that `Request(..., stream=...)` does not auto-generate any headers on the request instance. (Pull #1607)354355### Fixed356357* Pass through `timeout=...` in top-level httpx.stream() function. (Pull #1613)358* Map httpcore transport close exceptions to httpx exceptions. (Pull #1606)359360## 0.18.0 (27th April, 2021)361362The 0.18.x release series formalises our low-level Transport API, introducing the base classes `httpx.BaseTransport` and `httpx.AsyncBaseTransport`.363

Fix broken links in docs/contributing.md and CHANGELOG.md (#3124)Nick Cameronbefore adoption4941b40

line 364why, one step back
364See the "[Custom transports](https://www.python-httpx.org/advanced/transports/#custom-transports)" documentation and the [`httpx.BaseTransport.handle_request()`](https://github.com/encode/httpx/blob/397aad98fdc8b7580a5fc3e88f1578b4302c6382/httpx/_transports/base.py#L77-L147) docstring for more complete details on implementing custom transports.

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 365–617why, one step back
365
366Pull request #1522 includes a checklist of differences from the previous `httpcore` transport API, for developers implementing custom transports.367368The following API changes have been issuing deprecation warnings since 0.17.0 onwards, and are now fully deprecated...369370* You should now use httpx.codes consistently instead of httpx.StatusCodes.371* Use limits=... instead of pool_limits=....372* Use proxies={"http://": ...} instead of proxies={"http": ...} for scheme-specific mounting.373374### Changed375376* Transport instances now inherit from `httpx.BaseTransport` or `httpx.AsyncBaseTransport`,377 and should implement either the `handle_request` method or `handle_async_request` method. (Pull #1522, #1550)378* The `response.ext` property and `Response(ext=...)` argument are now named `extensions`. (Pull #1522)379* The recommendation to not use `data=<bytes|str|bytes (a)iterator>` in favour of `content=<bytes|str|bytes (a)iterator>` has now been escalated to a deprecation warning. (Pull #1573)380* Drop `Response(on_close=...)` from API, since it was a bit of leaking implementation detail. (Pull #1572)381* When using a client instance, cookies should always be set on the client, rather than on a per-request basis. We prefer enforcing a stricter API here because it provides clearer expectations around cookie persistence, particularly when redirects occur. (Pull #1574)382* The runtime exception `httpx.ResponseClosed` is now named `httpx.StreamClosed`. (#1584)383* The `httpx.QueryParams` model now presents an immutable interface. There is a discussion on [the design and motivation here](https://github.com/encode/httpx/discussions/1599). Use `client.params = client.params.merge(...)` instead of `client.params.update(...)`. The basic query manipulation methods are `query.set(...)`, `query.add(...)`, and `query.remove()`. (#1600)384385### Added386387* The `Request` and `Response` classes can now be serialized using pickle. (#1579)388* Handle `data={"key": [None|int|float|bool]}` cases. (Pull #1539)389* Support `httpx.URL(**kwargs)`, for example `httpx.URL(scheme="https", host="www.example.com", path="/')`, or `httpx.URL("https://www.example.com/", username="tom@gmail.com", password="123 456")`. (Pull #1601)390* Support `url.copy_with(params=...)`. (Pull #1601)391* Add `url.params` parameter, returning an immutable `QueryParams` instance. (Pull #1601)392* Support query manipulation methods on the URL class. These are `url.copy_set_param()`, `url.copy_add_param()`, `url.copy_remove_param()`, `url.copy_merge_params()`. (Pull #1601)393* The `httpx.URL` class now performs port normalization, so `:80` ports are stripped from `http` URLs and `:443` ports are stripped from `https` URLs. (Pull #1603)394* The `URL.host` property returns unicode strings for internationalized domain names. The `URL.raw_host` property returns byte strings with IDNA escaping applied. (Pull #1590)395396### Fixed397398* Fix Content-Length for cases of `files=...` where unicode string is used as the file content. (Pull #1537)399* Fix some cases of merging relative URLs against `Client(base_url=...)`. (Pull #1532)400* The `request.content` attribute is now always available except for streaming content, which requires an explicit `.read()`. (Pull #1583)401402## 0.17.1 (March 15th, 2021)403404### Fixed405406* Type annotation on `CertTypes` allows `keyfile` and `password` to be optional. (Pull #1503)407* Fix httpcore pinned version. (Pull #1495)408409## 0.17.0 (February 28th, 2021)410411### Added412413* Add `httpx.MockTransport()`, allowing to mock out a transport using pre-determined responses. (Pull #1401, Pull #1449)414* Add `httpx.HTTPTransport()` and `httpx.AsyncHTTPTransport()` default transports. (Pull #1399)415* Add mount API support, using `httpx.Client(mounts=...)`. (Pull #1362)416* Add `chunk_size` parameter to `iter_raw()`, `iter_bytes()`, `iter_text()`. (Pull #1277)417* Add `keepalive_expiry` parameter to `httpx.Limits()` configuration. (Pull #1398)418* Add repr to `httpx.Cookies` to display available cookies. (Pull #1411)419* Add support for `params=<tuple>` (previously only `params=<list>` was supported). (Pull #1426)420421### Fixed422423* Add missing `raw_path` to ASGI scope. (Pull #1357)424* Tweak `create_ssl_context` defaults to use `trust_env=True`. (Pull #1447)425* Properly URL-escape WSGI `PATH_INFO`. (Pull #1391)426* Properly set default ports in WSGI transport. (Pull #1469)427* Properly encode slashes when using `base_url`. (Pull #1407)428* Properly map exceptions in `request.aclose()`. (Pull #1465)429430## 0.16.1 (October 8th, 2020)431432### Fixed433434* Support literal IPv6 addresses in URLs. (Pull #1349)435* Force lowercase headers in ASGI scope dictionaries. (Pull #1351)436437## 0.16.0 (October 6th, 2020)438439### Changed440441* Preserve HTTP header casing. (Pull #1338, encode/httpcore#216, python-hyper/h11#104)442* Drop `response.next()` and `response.anext()` methods in favour of `response.next_request` attribute. (Pull #1339)443* Closed clients now raise a runtime error if attempting to send a request. (Pull #1346)444445### Added446447* Add Python 3.9 to officially supported versions.448* Type annotate `__enter__`/`__exit__`/`__aenter__`/`__aexit__` in a way that supports subclasses of `Client` and `AsyncClient`. (Pull #1336)449450## 0.15.5 (October 1st, 2020)451452### Added453454* Add `response.next_request` (Pull #1334)455456## 0.15.4 (September 25th, 2020)457458### Added459460* Support direct comparisons between `Headers` and dicts or lists of two-tuples. Eg. `assert response.headers == {"Content-Length": 24}` (Pull #1326)461462### Fixed463464* Fix automatic `.read()` when `Response` instances are created with `content=<str>` (Pull #1324)465466## 0.15.3 (September 24th, 2020)467468### Fixed469470* Fixed connection leak in async client due to improper closing of response streams. (Pull #1316)471472## 0.15.2 (September 23nd, 2020)473474### Fixed475476* Fixed `response.elapsed` property. (Pull #1313)477* Fixed client authentication interaction with `.stream()`. (Pull #1312)478479## 0.15.1 (September 23nd, 2020)480481### Fixed482483* ASGITransport now properly applies URL decoding to the `path` component, as-per the ASGI spec. (Pull #1307)484485## 0.15.0 (September 22nd, 2020)486487### Added488489* Added support for curio. (Pull https://github.com/encode/httpcore/pull/168)490* Added support for event hooks. (Pull #1246)491* Added support for authentication flows which require either sync or async I/O. (Pull #1217)492* Added support for monitoring download progress with `response.num_bytes_downloaded`. (Pull #1268)493* Added `Request(content=...)` for byte content, instead of overloading `Request(data=...)` (Pull #1266)494* Added support for all URL components as parameter names when using `url.copy_with(...)`. (Pull #1285)495* Neater split between automatically populated headers on `Request` instances, vs default `client.headers`. (Pull #1248)496* Unclosed `AsyncClient` instances will now raise warnings if garbage collected. (Pull #1197)497* Support `Response(content=..., text=..., html=..., json=...)` for creating usable response instances in code. (Pull #1265, #1297)498* Support instantiating requests from the low-level transport API. (Pull #1293)499* Raise errors on invalid URL types. (Pull #1259)500501### Changed502503* Cleaned up expected behaviour for URL escaping. `url.path` is now URL escaped. (Pull #1285)504* Cleaned up expected behaviour for bytes vs str in URL components. `url.userinfo` and `url.query` are not URL escaped, and so return bytes. (Pull #1285)505* Drop `url.authority` property in favour of `url.netloc`, since "authority" was semantically incorrect. (Pull #1285)506* Drop `url.full_path` property in favour of `url.raw_path`, for better consistency with other parts of the API. (Pull #1285)507* No longer use the `chardet` library for auto-detecting charsets, instead defaulting to a simpler approach when no charset is specified. (#1269)508509### Fixed510511* Swapped ordering of redirects and authentication flow. (Pull #1267)512* `.netrc` lookups should use host, not host+port. (Pull #1298)513514### Removed515516* The `URLLib3Transport` class no longer exists. We've published it instead as an example of [a custom transport class](https://gist.github.com/florimondmanca/d56764d78d748eb9f73165da388e546e). (Pull #1182)517* Drop `request.timer` attribute, which was being used internally to set `response.elapsed`. (Pull #1249)518* Drop `response.decoder` attribute, which was being used internally. (Pull #1276)519* `Request.prepare()` is now a private method. (Pull #1284)520* The `Headers.getlist()` method had previously been deprecated in favour of `Headers.get_list()`. It is now fully removed.521* The `QueryParams.getlist()` method had previously been deprecated in favour of `QueryParams.get_list()`. It is now fully removed.522* The `URL.is_ssl` property had previously been deprecated in favour of `URL.scheme == "https"`. It is now fully removed.523* The `httpx.PoolLimits` class had previously been deprecated in favour of `httpx.Limits`. It is now fully removed.524* The `max_keepalive` setting had previously been deprecated in favour of the more explicit `max_keepalive_connections`. It is now fully removed.525* The verbose `httpx.Timeout(5.0, connect_timeout=60.0)` style had previously been deprecated in favour of `httpx.Timeout(5.0, connect=60.0)`. It is now fully removed.526* Support for instantiating a timeout config missing some defaults, such as `httpx.Timeout(connect=60.0)`, had previously been deprecated in favour of enforcing a more explicit style, such as `httpx.Timeout(5.0, connect=60.0)`. This is now strictly enforced.527528## 0.14.3 (September 2nd, 2020)529530### Added531532* `http.Response()` may now be instantiated without a `request=...` parameter. Useful for some unit testing cases. (Pull #1238)533* Add `103 Early Hints` and `425 Too Early` status codes. (Pull #1244)534535### Fixed536537* `DigestAuth` now handles responses that include multiple 'WWW-Authenticate' headers. (Pull #1240)538* Call into transport `__enter__`/`__exit__` or `__aenter__`/`__aexit__` when client is used in a context manager style. (Pull #1218)539540## 0.14.2 (August 24th, 2020)541542### Added543544* Support `client.get(..., auth=None)` to bypass the default authentication on a clients. (Pull #1115)545* Support `client.auth = ...` property setter. (Pull #1185)546* Support `httpx.get(..., proxies=...)` on top-level request functions. (Pull #1198)547* Display instances with nicer import styles. (Eg. <httpx.ReadTimeout ...>) (Pull #1155)548* Support `cookies=[(key, value)]` list-of-two-tuples style usage. (Pull #1211)549550### Fixed551552* Ensure that automatically included headers on a request may be modified. (Pull #1205)553* Allow explicit `Content-Length` header on streaming requests. (Pull #1170)554* Handle URL quoted usernames and passwords properly. (Pull #1159)555* Use more consistent default for `HEAD` requests, setting `allow_redirects=True`. (Pull #1183)556* If a transport error occurs while streaming the response, raise an `httpx` exception, not the underlying `httpcore` exception. (Pull #1190)557* Include the underlying `httpcore` traceback, when transport exceptions occur. (Pull #1199)558559## 0.14.1 (August 11th, 2020)560561### Added562563* The `httpx.URL(...)` class now raises `httpx.InvalidURL` on invalid URLs, rather than exposing the underlying `rfc3986` exception. If a redirect response includes an invalid 'Location' header, then a `RemoteProtocolError` exception is raised, which will be associated with the request that caused it. (Pull #1163)564565### Fixed566567* Handling multiple `Set-Cookie` headers became broken in the 0.14.0 release, and is now resolved. (Pull #1156)568569## 0.14.0 (August 7th, 2020)570571The 0.14 release includes a range of improvements to the public API, intended on preparing for our upcoming 1.0 release.572573* Our HTTP/2 support is now fully optional. **You now need to use `pip install httpx[http2]` if you want to include the HTTP/2 dependencies.**574* Our HSTS support has now been removed. Rewriting URLs from `http` to `https` if the host is on the HSTS list can be beneficial in avoiding roundtrips to incorrectly formed URLs, but on balance we've decided to remove this feature, on the principle of least surprise. Most programmatic clients do not include HSTS support, and for now we're opting to remove our support for it.575* Our exception hierarchy has been overhauled. Most users will want to stick with their existing `httpx.HTTPError` usage, but we've got a clearer overall structure now. See https://www.python-httpx.org/exceptions/ for more details.576577When upgrading you should be aware of the following public API changes. Note that deprecated usages will currently continue to function, but will issue warnings.578579* You should now use `httpx.codes` consistently instead of `httpx.StatusCodes`.580* Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`.581* When using `httpx.Timeout()`, we now have more concisely named keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`.582* Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`.583* The `httpx.Limits(max_keepalive=...)` argument is now deprecated in favour of a more explicit `httpx.Limits(max_keepalive_connections=...)`.584* Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`.585* The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants.586* The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`.587* The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. This change does not support warnings for the deprecated usage style.588589One notable aspect of the 0.14.0 release is that it tightens up the public API for `httpx`, by ensuring that several internal attributes and methods have now become strictly private.590591The following previously had nominally public names on the client, but were all undocumented and intended solely for internal usage. They are all now replaced with underscored names, and should not be relied on or accessed.592593These changes should not affect users who have been working from the `httpx` documentation.594595* `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`596* `.build_auth()`, `.build_redirect_request()`597* `.redirect_method()`, `.redirect_url()`, `.redirect_headers()`, `.redirect_stream()`598* `.send_handling_redirects()`, `.send_handling_auth()`, `.send_single_request()`599* `.init_transport()`, `.init_proxy_transport()`600* `.proxies`, `.transport`, `.netrc`, `.get_proxy_map()`601602See pull requests #997, #1065, #1071.603604Some areas of API which were already on the deprecation path, and were raising warnings or errors in 0.13.x have now been escalated to being fully removed.605606* Drop `ASGIDispatch`, `WSGIDispatch`, which have been replaced by `ASGITransport`, `WSGITransport`.607* Drop `dispatch=...`` on client, which has been replaced by `transport=...``608* Drop `soft_limit`, `hard_limit`, which have been replaced by `max_keepalive` and `max_connections`.609* Drop `Response.stream` and` `Response.raw`, which have been replaced by ``.aiter_bytes` and `.aiter_raw`.610* Drop `proxies=<transport instance>` in favor of `proxies=httpx.Proxy(...)`.611612See pull requests #1057, #1058.613614### Added615616* Added dedicated exception class `httpx.HTTPStatusError` for `.raise_for_status()` exceptions. (Pull #1072)617* Added `httpx.create_ssl_context()` helper function. (Pull #996)

Update CHANGELOG.md, fix typo(s) (#3406)Bob Conanbefore adoption189fc4b

line 618why, one step back
618* Support for proxy exclusions like `proxies={"https://www.example.com": None}`. (Pull #1099)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 619–680why, one step back
619* Support `QueryParams(None)` and `client.params = None`. (Pull #1060)
620621### Changed622623* Use `httpx.codes` consistently in favour of `httpx.StatusCodes` which is placed into deprecation. (Pull #1088)624* Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`. (Pull #1085)625* Switch to more concise `httpx.Timeout()` keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`. (Pull #1111)626* Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`. (Pull #1113)627* Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`. (Pull #1127)628* The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. (Pull #1089)629* `URL.port` becomes `Optional[int]`. Now only returns a port if one is explicitly included in the URL string. (Pull #1080)630* The `URL(..., allow_relative=[bool])` parameter no longer exists. All URL instances may be relative. (Pull #1073)631* Drop unnecessary `url.full_path = ...` property setter. (Pull #1069)632* The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. (Pull #1129)633* The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`. (Pull #1128)634635### Fixed636637* Add missing `Response.next()` method. (Pull #1055)638* Ensure all exception classes are exposed as public API. (Pull #1045)639* Support multiple items with an identical field name in multipart encodings. (Pull #777)640* Skip HSTS preloading on single-label domains. (Pull #1074)641* Fixes for `Response.iter_lines()`. (Pull #1033, #1075)642* Ignore permission errors when accessing `.netrc` files. (Pull #1104)643* Allow bare hostnames in `HTTP_PROXY` etc... environment variables. (Pull #1120)644* Settings `app=...` or `transport=...` bypasses any environment based proxy defaults. (Pull #1122)645* Fix handling of `.base_url` when a path component is included in the base URL. (Pull #1130)646647---648649## 0.13.3 (May 29th, 2020)650651### Fixed652653* Include missing keepalive expiry configuration. (Pull #1005)654* Improved error message when URL redirect has a custom scheme. (Pull #1002)655656## 0.13.2 (May 27th, 2020)657658### Fixed659660* Include explicit "Content-Length: 0" on POST, PUT, PATCH if no request body is used. (Pull #995)661* Add `http2` option to `httpx.Client`. (Pull #982)662* Tighten up API typing in places. (Pull #992, #999)663664## 0.13.1 (May 22nd, 2020)665666### Fixed667668* Fix pool options deprecation warning. (Pull #980)669* Include `httpx.URLLib3ProxyTransport` in top-level API. (Pull #979)670671## 0.13.0 (May 22nd, 2020)672673This release switches to `httpcore` for all the internal networking, which means:674675* We're using the same codebase for both our sync and async clients.676* HTTP/2 support is now available with the sync client.677* We no longer have a `urllib3` dependency for our sync client, although there is still an *optional* `URLLib3Transport` class.678679It also means we've had to remove our UDS support, since maintaining that would have meant having to push back our work towards a 1.0 release, which isn't a trade-off we wanted to make.680

Fix broken links in docs/contributing.md and CHANGELOG.md (#3124)Nick Cameronbefore adoption4941b40

line 681why, one step back
681We also now have [a public "Transport API"](https://www.python-httpx.org/advanced/transports/#custom-transports), which you can use to implement custom transport implementations against. This formalises and replaces our previously private "Dispatch API".

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 682–845why, one step back
682
683### Changed684685* Use `httpcore` for underlying HTTP transport. Drop `urllib3` requirement. (Pull #804, #967)686* Rename pool limit options from `soft_limit`/`hard_limit` to `max_keepalive`/`max_connections`. (Pull #968)687* The previous private "Dispatch API" has now been promoted to a public "Transport API". When customizing the transport use `transport=...`. The `ASGIDispatch` and `WSGIDispatch` class naming is deprecated in favour of `ASGITransport` and `WSGITransport`. (Pull #963)688689### Added690691* Added `URLLib3Transport` class for optional `urllib3` transport support. (Pull #804, #963)692* Streaming multipart uploads. (Pull #857)693* Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables694and TRACE level logging. (Pull encode/httpcore#79)695696### Fixed697698* Performance improvement in brotli decoder. (Pull #906)699* Proper warning level of deprecation notice in `Response.stream` and `Response.raw`. (Pull #908)700* Fix support for generator based WSGI apps. (Pull #887)701* Reuse of connections on HTTP/2 in close concurrency situations. (Pull encode/httpcore#81)702* Honor HTTP/2 max concurrent streams settings (Pull encode/httpcore#89, encode/httpcore#90)703* Fix bytes support in multipart uploads. (Pull #974)704* Improve typing support for `files=...`. (Pull #976)705706### Removed707708* Dropped support for `Client(uds=...)` (Pull #804)709710## 0.13.0.dev2 (May 12th, 2020)711712The 0.13.0.dev2 is a *pre-release* version. To install it, use `pip install httpx --pre`.713714### Added715716* Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables717and TRACE level logging. (HTTPCore Pull #79)718719### Fixed720721* Reuse of connections on HTTP/2 in close concurrency situations. (HTTPCore Pull #81)722* When using an `app=<ASGI app>` observe neater disconnect behaviour instead of sending empty body messages. (Pull #919)723724## 0.13.0.dev1 (May 6th, 2020)725726The 0.13.0.dev1 is a *pre-release* version. To install it, use `pip install httpx --pre`.727728### Fixed729730* Passing `http2` flag to proxy dispatchers. (Pull #934)731* Use [`httpcore` v0.8.3](https://github.com/encode/httpcore/releases/tag/0.8.3)732which addresses problems in handling of headers when using proxies.733734## 0.13.0.dev0 (April 30th, 2020)735736The 0.13.0.dev0 is a *pre-release* version. To install it, use `pip install httpx --pre`.737738This release switches to `httpcore` for all the internal networking, which means:739740* We're using the same codebase for both our sync and async clients.741* HTTP/2 support is now available with the sync client.742* We no longer have a `urllib3` dependency for our sync client, although there is still an *optional* `URLLib3Dispatcher` class.743744It also means we've had to remove our UDS support, since maintaining that would have meant having to push back our work towards a 1.0 release, which isn't a trade-off we wanted to make.745746### Changed747748* Use `httpcore` for underlying HTTP transport. Drop `urllib3` requirement. (Pull #804)749750### Added751752* Added `URLLib3Dispatcher` class for optional `urllib3` transport support. (Pull #804)753* Streaming multipart uploads. (Pull #857)754755### Fixed756757* Performance improvement in brotli decoder. (Pull #906)758* Proper warning level of deprecation notice in `Response.stream` and `Response.raw`. (Pull #908)759* Fix support for generator based WSGI apps. (Pull #887)760761### Removed762763* Dropped support for `Client(uds=...)` (Pull #804)764765---766767## 0.12.1 (March 19th, 2020)768769### Fixed770771* Resolved packaging issue, where additional files were being included.772773## 0.12.0 (March 9th, 2020)774775The 0.12 release tightens up the API expectations for `httpx` by switching to private module names to enforce better clarity around public API.776777All imports of `httpx` should import from the top-level package only, such as `from httpx import Request`, rather than importing from privately namespaced modules such as `from httpx._models import Request`.778779### Added780781* Support making response body available to auth classes with `.requires_response_body`. (Pull #803)782* Export `NetworkError` exception. (Pull #814)783* Add support for `NO_PROXY` environment variable. (Pull #835)784785### Changed786787* Switched to private module names. (Pull #785)788* Drop redirect looping detection and the `RedirectLoop` exception, instead using `TooManyRedirects`. (Pull #819)789* Drop `backend=...` parameter on `AsyncClient`, in favour of always autodetecting `trio`/`asyncio`. (Pull #791)790791### Fixed792793* Support basic auth credentials in proxy URLs. (Pull #780)794* Fix `httpx.Proxy(url, mode="FORWARD_ONLY")` configuration. (Pull #788)795* Fallback to setting headers as UTF-8 if no encoding is specified. (Pull #820)796* Close proxy dispatches classes on client close. (Pull #826)797* Support custom `cert` parameters even if `verify=False`. (Pull #796)798* Don't support invalid dict-of-dicts form data in `data=...`. (Pull #811)799800---801802## 0.11.1 (January 17th, 2020)803804### Fixed805806* Fixed usage of `proxies=...` on `Client()`. (Pull #763)807* Support both `zlib` and `deflate` style encodings on `Content-Encoding: deflate`. (Pull #758)808* Fix for streaming a redirect response body with `allow_redirects=False`. (Pull #766)809* Handle redirect with malformed Location headers missing host. (Pull #774)810811## 0.11.0 (January 9th, 2020)812813The 0.11 release reintroduces our sync support, so that `httpx` now supports both a standard thread-concurrency API, and an async API.814815Existing async `httpx` users that are upgrading to 0.11 should ensure that:816817* Async codebases should always use a client instance to make requests, instead of the top-level API.818* The async client is named as `httpx.AsyncClient()`, instead of `httpx.Client()`.819* When instantiating proxy configurations use the `httpx.Proxy()` class, instead of the previous `httpx.HTTPProxy()`. This new configuration class works for configuring both sync and async clients.820821We believe the API is now pretty much stable, and are aiming for a 1.0 release sometime on or before April 2020.822823### Changed824825- Top level API such as `httpx.get(url, ...)`, `httpx.post(url, ...)`, `httpx.request(method, url, ...)` becomes synchronous.826- Added `httpx.Client()` for synchronous clients, with `httpx.AsyncClient` being used for async clients.827- Switched to `proxies=httpx.Proxy(...)` for proxy configuration.828- Network connection errors are wrapped in `httpx.NetworkError`, rather than exposing lower-level exception types directly.829830### Removed831832- The `request.url.origin` property and `httpx.Origin` class are no longer available.833- The per-request `cert`, `verify`, and `trust_env` arguments are escalated from raising errors if used, to no longer being available. These arguments should be used on a per-client instance instead, or in the top-level API.834- The `stream` argument has escalated from raising an error when used, to no longer being available. Use the `client.stream(...)` or `httpx.stream()` streaming API instead.835836### Fixed837838- Redirect loop detection matches against `(method, url)` rather than `url`. (Pull #734)839840---841842## 0.10.1 (December 31st, 2019)843844### Fixed845

Update CHANGELOG.md, fix typo(s) (#3406)Bob Conanbefore adoption189fc4b

line 846why, one step back
846- Fix issue with concurrent connection acquisition. (Pull #700)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 847–1094why, one step back
847- Fix write error on closing HTTP/2 connections. (Pull #699)
848849## 0.10.0 (December 29th, 2019)850851The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces.852853In particular with streaming responses the `response.read()` method becomes `response.aread()`, and the `response.close()` method becomes `response.aclose()`.854855If following redirects explicitly the `response.next()` method becomes `response.anext()`.856857### Fixed858859- End HTTP/2 streams immediately on no-body requests, rather than sending an empty body message. (Pull #682)860- Improve typing for `Response.request`: switch from `Optional[Request]` to `Request`. (Pull #666)861- `Response.elapsed` now reflects the entire download time. (Pull #687, #692)862863### Changed864865- Added `AsyncClient` as a synonym for `Client`. (Pull #680)866- Switch to `response.aread()` for conditionally reading streaming responses. (Pull #674)867- Switch to `response.aclose()` and `client.aclose()` for explicit closing. (Pull #674, #675)868- Switch to `response.anext()` for resolving the next redirect response. (Pull #676)869870### Removed871872- When using a client instance, the per-request usage of `verify`, `cert`, and `trust_env` have now escalated from raising a warning to raising an error. You should set these arguments on the client instead. (Pull #617)873- Removed the undocumented `request.read()`, since end users should not require it.874875---876877## 0.9.5 (December 20th, 2019)878879### Fixed880881- Fix Host header and HSTS rewrites when an explicit `:80` port is included in URL. (Pull #649)882- Query Params on the URL string are merged with any `params=...` argument. (Pull #653)883- More robust behavior when closing connections. (Pull #640)884- More robust behavior when handling HTTP/2 headers with trailing whitespace. (Pull #637)885- Allow any explicit `Content-Type` header to take precedence over the encoding default. (Pull #633)886887## 0.9.4 (December 12th, 2019)888889### Fixed890891- Added expiry to Keep-Alive connections, resolving issues with acquiring connections. (Pull #627)892- Increased flow control windows on HTTP/2, resolving download speed issues. (Pull #629)893894## 0.9.3 (December 7th, 2019)895896### Fixed897898- Fixed HTTP/2 with autodetection backend. (Pull #614)899900## 0.9.2 (December 7th, 2019)901902* Released due to packaging build artifact.903904## 0.9.1 (December 6th, 2019)905906* Released due to packaging build artifact.907908## 0.9.0 (December 6th, 2019)909910The 0.9 releases brings some major new features, including:911912* A new streaming API.913* Autodetection of either asyncio or trio.914* Nicer timeout configuration.915* HTTP/2 support off by default, but can be enabled.916917We've also removed all private types from the top-level package export.918919In order to ensure you are only ever working with public API you should make920sure to only import the top-level package eg. `import httpx`, rather than921importing modules within the package.922923### Added924925- Added concurrency backend autodetection. (Pull #585)926- Added `Client(backend='trio')` and `Client(backend='asyncio')` API. (Pull #585)927- Added `response.stream_lines()` API. (Pull #575)928- Added `response.is_error` API. (Pull #574)929- Added support for `timeout=Timeout(5.0, connect_timeout=60.0)` styles. (Pull #593)930931### Fixed932933- Requests or Clients with `timeout=None` now correctly always disable timeouts. (Pull #592)934- Request 'Authorization' headers now have priority over `.netrc` authentication info. (Commit 095b691)935- Files without a filename no longer set a Content-Type in multipart data. (Commit ed94950)936937### Changed938939- Added `httpx.stream()` API. Using `stream=True` now results in a warning. (Pull #600, #610)940- HTTP/2 support is switched to "off by default", but can be enabled explicitly. (Pull #584)941- Switched to `Client(http2=True)` API from `Client(http_versions=["HTTP/1.1", "HTTP/2"])`. (Pull #586)942- Removed all private types from the top-level package export. (Pull #608)943- The SSL configuration settings of `verify`, `cert`, and `trust_env` now raise warnings if used per-request when using a Client instance. They should always be set on the Client instance itself. (Pull #597)944- Use plain strings "TUNNEL_ONLY" or "FORWARD_ONLY" on the HTTPProxy `proxy_mode` argument. The `HTTPProxyMode` enum still exists, but its usage will raise warnings. (#610)945- Pool timeouts are now on the timeout configuration, not the pool limits configuration. (Pull #563)946- The timeout configuration is now named `httpx.Timeout(...)`, not `httpx.TimeoutConfig(...)`. The old version currently remains as a synonym for backwards compatibility. (Pull #591)947948---949950## 0.8.0 (November 27, 2019)951952### Removed953954- The synchronous API has been removed, in order to allow us to fundamentally change how we approach supporting both sync and async variants. (See #588 for more details.)955956---957958## 0.7.8 (November 17, 2019)959960### Added961962- Add support for proxy tunnels for Python 3.6 + asyncio. (Pull #521)963964## 0.7.7 (November 15, 2019)965966### Fixed967968- Resolve an issue with cookies behavior on redirect requests. (Pull #529)969970### Added971972- Add request/response DEBUG logs. (Pull #502)973- Use TRACE log level for low level info. (Pull #500)974975## 0.7.6 (November 2, 2019)976977### Removed978979- Drop `proxies` parameter from the high-level API. (Pull #485)980981### Fixed982983- Tweak multipart files: omit null filenames, add support for `str` file contents. (Pull #482)984- Cache NETRC authentication per-client. (Pull #400)985- Rely on `getproxies` for all proxy environment variables. (Pull #470)986- Wait for the `asyncio` stream to close when closing a connection. (Pull #494)987988## 0.7.5 (October 10, 2019)989990### Added991992- Allow lists of values to be passed to `params`. (Pull #386)993- `ASGIDispatch`, `WSGIDispatch` are now available in the `httpx.dispatch` namespace. (Pull #407)994- `HTTPError` is now available in the `httpx` namespace. (Pull #421)995- Add support for `start_tls()` to the Trio concurrency backend. (Pull #467)996997### Fixed998999- Username and password are no longer included in the `Host` header when basic authentication1000 credentials are supplied via the URL. (Pull #417)10011002### Removed10031004- The `.delete()` function no longer has `json`, `data`, or `files` parameters1005 to match the expected semantics of the `DELETE` method. (Pull #408)1006- Removed the `trio` extra. Trio support is detected automatically. (Pull #390)10071008## 0.7.4 (September 25, 2019)10091010### Added10111012- Add Trio concurrency backend. (Pull #276)1013- Add `params` parameter to `Client` for setting default query parameters. (Pull #372)1014- Add support for `SSL_CERT_FILE` and `SSL_CERT_DIR` environment variables. (Pull #307)1015- Add debug logging to calls into ASGI apps. (Pull #371)1016- Add debug logging to SSL configuration. (Pull #378)10171018### Fixed10191020- Fix a bug when using `Client` without timeouts in Python 3.6. (Pull #383)1021- Propagate `Client` configuration to HTTP proxies. (Pull #377)10221023## 0.7.3 (September 20, 2019)10241025### Added10261027- HTTP Proxy support. (Pulls #259, #353)1028- Add Digest authentication. (Pull #332)1029- Add `.build_request()` method to `Client` and `AsyncClient`. (Pull #319)1030- Add `.elapsed` property on responses. (Pull #351)1031- Add support for `SSLKEYLOGFILE` in Python 3.8b4+. (Pull #301)10321033### Removed10341035- Drop NPN support for HTTP version negotiation. (Pull #314)10361037### Fixed10381039- Fix distribution of type annotations for mypy (Pull #361).1040- Set `Host` header when redirecting cross-origin. (Pull #321)1041- Drop `Content-Length` headers on `GET` redirects. (Pull #310)1042- Raise `KeyError` if header isn't found in `Headers`. (Pull #324)1043- Raise `NotRedirectResponse` in `response.next()` if there is no redirection to perform. (Pull #297)1044- Fix bug in calculating the HTTP/2 maximum frame size. (Pull #153)10451046## 0.7.2 (August 28, 2019)10471048- Enforce using `httpx.AsyncioBackend` for the synchronous client. (Pull #232)1049- `httpx.ConnectionPool` will properly release a dropped connection. (Pull #230)1050- Remove the `raise_app_exceptions` argument from `Client`. (Pull #238)1051- `DecodeError` will no longer be raised for an empty body encoded with Brotli. (Pull #237)1052- Added `http_versions` parameter to `Client`. (Pull #250)1053- Only use HTTP/1.1 on short-lived connections like `httpx.get()`. (Pull #284)1054- Convert `Client.cookies` and `Client.headers` when set as a property. (Pull #274)1055- Setting `HTTPX_DEBUG=1` enables debug logging on all requests. (Pull #277)10561057## 0.7.1 (August 18, 2019)10581059- Include files with source distribution to be installable. (Pull #233)10601061## 0.7.0 (August 17, 2019)10621063- Add the `trust_env` property to `BaseClient`. (Pull #187)1064- Add the `links` property to `BaseResponse`. (Pull #211)1065- Accept `ssl.SSLContext` instances into `SSLConfig(verify=...)`. (Pull #215)1066- Add `Response.stream_text()` with incremental encoding detection. (Pull #183)1067- Properly updated the `Host` header when a redirect changes the origin. (Pull #199)1068- Ignore invalid `Content-Encoding` headers. (Pull #196)1069- Use `~/.netrc` and `~/_netrc` files by default when `trust_env=True`. (Pull #189)1070- Create exception base class `HTTPError` with `request` and `response` properties. (Pull #162)1071- Add HSTS preload list checking within `BaseClient` to upgrade HTTP URLs to HTTPS. (Pull #184)1072- Switch IDNA encoding from IDNA 2003 to IDNA 2008. (Pull #161)1073- Expose base classes for alternate concurrency backends. (Pull #178)1074- Improve Multipart parameter encoding. (Pull #167)1075- Add the `headers` property to `BaseClient`. (Pull #159)1076- Add support for Google's `brotli` library. (Pull #156)1077- Remove deprecated TLS versions (TLSv1 and TLSv1.1) from default `SSLConfig`. (Pull #155)1078- Fix `URL.join(...)` to work similarly to RFC 3986 URL joining. (Pull #144)10791080---10811082## 0.6.8 (July 25, 2019)10831084- Check for disconnections when searching for an available1085 connection in `ConnectionPool.keepalive_connections` (Pull #145)1086- Allow string comparison for `URL` objects (Pull #139)1087- Add HTTP status codes 418 and 451 (Pull #135)1088- Add support for client certificate passwords (Pull #118)1089- Enable post-handshake client cert authentication for TLSv1.3 (Pull #118)1090- Disable using `commonName` for hostname checking for OpenSSL 1.1.0+ (Pull #118)1091- Detect encoding for `Response.json()` (Pull #116)10921093## 0.6.7 (July 8, 2019)1094

Update CHANGELOG.md, fix typo(s) (#3406)Bob Conanbefore adoption189fc4b

line 1095why, one step back
1095- Check for connection aliveness on re-acquisition (Pull #111)

Bump coverage from 7.2.1 to 7.2.2 (#2641)dependabot[bot]before adoptionab8177c

lines 1096–1125why, one step back
1096
1097## 0.6.6 (July 3, 2019)10981099- Improve `USER_AGENT` (Pull #110)1100- Add `Connection: keep-alive` by default to HTTP/1.1 connections. (Pull #110)11011102## 0.6.5 (June 27, 2019)11031104- Include `Host` header by default. (Pull #109)1105- Improve HTTP protocol detection. (Pull #107)11061107## 0.6.4 (June 25, 2019)11081109- Implement read and write timeouts (Pull #104)11101111## 0.6.3 (June 24, 2019)11121113- Handle early connection closes (Pull #103)11141115## 0.6.2 (June 23, 2019)11161117- Use urllib3's `DEFAULT_CIPHERS` for the `SSLConfig` object. (Pull #100)11181119## 0.6.1 (June 21, 2019)11201121- Add support for setting a `base_url` on the `Client`.11221123## 0.6.0 (June 21, 2019)11241125- Honor `local_flow_control_window` for HTTP/2 connections (Pull #98)