Version 0.14.0 (#1083)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Version 0.14.0 * Update CHANGELOG * Update CHANGELOG.md Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com> * Update CHANGELOG * max_keepalive_connections * Add deprecation test * Update CHANGELOG.md * Undate dependency pin callout * Update expected 1.0 release date
authored by Tom Christie · committed by GitHub · parent 8d9dfb5 · Browse files · 6 files·+105 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
Diff stats
6 files+105 added−6 removed
- tests:+5 added−0 removed
- other:+100 added−6 removed
Provenance
- Commit
8c7729e- Tree
fba11b2- Author
Tom Christie <tom@tomchristie.com>- Committer
GitHub <noreply@github.com>- Parent
8d9dfb5
6 files changed+105 added−6 removed
modified:docs/index.md+2 added-2 removed
25 unmodified lines26272829303031323233343536104 unmodified linesExpand all25 unmodified lines
!!! note HTTPX should currently be considered in beta.
We believe we've got the public API to a stable point now, but would strongly recommend pinning your dependencies to the `0.13.*` release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md). We believe we've got the public API to a stable point now, but would strongly recommend pinning your dependencies to the `0.14.*` release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md).
A 1.0 release is expected to be issued sometime around mid-2020. A 1.0 release is expected to be issued sometime around september 2020.
---
Let's get started...104 unmodified linesExpand allmodified:httpx/__version__.py+1 added-1 removed
1 __title__ = "httpx"2 __description__ = "A next generation HTTP client, for Python 3."3-__version__ = "0.13.3"3+__version__ = "0.14.0"modified:httpx/_config.py+1 added-1 removed
409 unmodified lines410 )411 412 413 DEFAULT_TIMEOUT_CONFIG = Timeout(timeout=5.0)414-DEFAULT_LIMITS = Limits(max_keepalive=10, max_connections=100)414+DEFAULT_LIMITS = Limits(max_connections=100, max_keepalive_connections=20)415 DEFAULT_MAX_REDIRECTS = 20modified:tests/test_config.py+5 added
113 unmodified lines114 with pytest.warns(DeprecationWarning):115 httpx.PoolLimits()116 117 118+def test_max_keepalive_deprecated():119+ with pytest.warns(DeprecationWarning):120+ httpx.Limits(max_keepalive=50)121+122+123 def test_timeout_eq():124 timeout = httpx.Timeout(timeout=5.0)125 assert timeout == httpx.Timeout(timeout=5.0)126 116 unmodified linesmodified:CHANGELOG.md+94 added
2 unmodified lines3 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+## 0.14.0 (August 7th, 2020)8+9+The 0.14 release includes a range of improvements to the public API, intended on preparing for our upcoming 1.0 release.10+11+* 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 dependancies.**12+* 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.13+* 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.14+15+When upgrading you should be aware of the following public API changes. Note that deprecated usages will currently continue to function, but will issue warnings.16+17+* You should now use `httpx.codes` consistently in favour of `httpx.StatusCodes`.18+* Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`.19+* When using `httpx.Timeout()`, we now have more concisely named keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`.20+* Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`.21+* The `httpx.Limits(max_keepalive=...)` argument is now deprecated in favour of a more explicit `httpx.Limits(max_keepalive_connections=...)`.22+* Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`.23+* The multidict methods `Headers.getlist()` and `QueryParams.getlist()` are deprecated in favour of more consistent `.get_list()` variants.24+* The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`.25+* The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. This change does not support warnings for the deprecated usage style.26+27+One 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.28+29+The 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.30+31+These changes should not affect users who have been working from the `httpx` documentation.32+33+* `.merge_url()`, `.merge_headers()`, `.merge_cookies()`, `.merge_queryparams()`34+* `.build_auth()`, `.build_redirect_request()`35+* `.redirect_method()`, `.redirect_url()`, `.redirect_headers()`, `.redirect_stream()`36+* `.send_handling_redirects()`, `.send_handling_auth()`, `.send_single_request()`37+* `.init_transport()`, `.init_proxy_transport()`38+* `.proxies`, `.transport`, `.netrc`, `.get_proxy_map()`39+40+See pull requests #997, #1065, #1071.41+42+Some 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.43+44+* Drop `ASGIDispatch`, `WSGIDispatch`, which have been replaced by `ASGITransport`, `WSGITransport`.45+* Drop `dispatch=...`` on client, which has been replaced by `transport=...``46+* Drop `soft_limit`, `hard_limit`, which have been replaced by `max_keepalive` and `max_connections`.47+* Drop `Response.stream` and` `Response.raw`, which have been replaced by ``.aiter_bytes` and `.aiter_raw`.48+* Drop `proxies=<transport instance>` in favor of `proxies=httpx.Proxy(...)`.49+50+See pull requests #1057, #1058.51+52+### Added53+54+* Added dedicated exception class `httpx.HTTPStatusError` for `.raise_for_status()` exceptions. (Pull #1072)55+* Added `httpx.create_ssl_context()` helper function. (Pull #996)56+* Support for proxy exlcusions like `proxies={"https://www.example.com": None}`. (Pull #1099)57+* Support `QueryParams(None)` and `client.params = None`. (Pull #1060)58+59+### Changed60+61+* Use `httpx.codes` consistently in favour of `httpx.StatusCodes` which is placed into deprecation. (Pull #1088)62+* Usage of `httpx.Timeout()` should now always include an explicit default. Eg. `httpx.Timeout(None, pool=5.0)`. (Pull #1085)63+* Switch to more concise `httpx.Timeout()` keyword arguments. Eg. `read=5.0`, instead of `read_timeout=5.0`. (Pull #1111)64+* Use `httpx.Limits()` instead of `httpx.PoolLimits()`, and `limits=...` instead of `pool_limits=...`. (Pull #1113)65+* Keys used with `Client(proxies={...})` should now be in the style of `{"http://": ...}`, rather than `{"http": ...}`. (Pull #1127)66+* The multidict methods `Headers.getlist` and `QueryParams.getlist` are deprecated in favour of more consistent `.get_list()` variants. (Pull #1089)67+* `URL.port` becomes `Optional[int]`. Now only returns a port if one is explicitly included in the URL string. (Pull #1080)68+* The `URL(..., allow_relative=[bool])` parameter no longer exists. All URL instances may be relative. (Pull #1073)69+* Drop unnecessary `url.full_path = ...` property setter. (Pull #1069)70+* The `URL.join(relative_url=...)` method is now `URL.join(url=...)`. (Pull #1129)71+* The `URL.is_ssl` property is deprecated in favour of `URL.scheme == "https"`. (Pull #1128)72+73+### Fixed74+75+* Add missing `Response.next()` method. (Pull #1055)76+* Ensure all exception classes are exposed as public API. (Pull #1045)77+* Support multiple items with an identical field name in multipart encodings. (Pull #777)78+* Skip HSTS preloading on single-label domains. (Pull #1074)79+* Fixes for `Response.iter_lines()`. (Pull #1033, #1075)80+* Ignore permission errors when accessing `.netrc` files. (Pull #1104)81+* Allow bare hostnames in `HTTP_PROXY` etc... environment variables. (Pull #1120)82+* Settings `app=...` or `transport=...` bypasses any environment based proxy defaults. (Pull #1122)83+* Fix handling of `.base_url` when a path component is included in the base URL. (Pull #1130)84+85+---86+87 ## 0.13.3 (May 29th, 2020)88 89 ### Fixed90 108 unmodified lines199 ### Removed200 201 * Dropped support for `Client(uds=...)` (Pull #804)202 203+---204+205 ## 0.12.1 (March 19th, 2020)206 207 ### Fixed208 25 unmodified lines234 * Close proxy dispatches classes on client close. (Pull #826)235 * Support custom `cert` parameters even if `verify=False`. (Pull #796)236 * Don't support invalid dict-of-dicts form data in `data=...`. (Pull #811)237 238+---239+240 ## 0.11.1 (January 17th, 2020)241 242 ### Fixed243 30 unmodified lines274 ### Fixed275 276 - Redirect loop detection matches against `(method, url)` rather than `url`. (Pull #734)277 278+---279+280 ## 0.10.1 (December 31st, 2019)281 282 ### Fixed283 25 unmodified lines309 310 - 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)311 - Removed the undocumented `request.read()`, since end users should not require it.312 313+---314+315 ## 0.9.5 (December 20th, 2019)316 317 ### Fixed318 63 unmodified lines382 - 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)383 - Pool timeouts are now on the timeout configuration, not the pool limits configuration. (Pull #563)384 - The timeout configuration is now named `httpx.Timeout(...)`, not `httpx.TimeoutConfig(...)`. The old version currently remains as a synonym for backwards compatability. (Pull #591)385 386+---387+388 ## 0.8.0 (November 27, 2019)389 390 ### Removed391 392 - 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.)393 394+---395+396 ## 0.7.8 (November 17, 2019)397 398 ### Added399 114 unmodified lines514 - Add support for Google's `brotli` library. (Pull #156)515 - Remove deprecated TLS versions (TLSv1 and TLSv1.1) from default `SSLConfig`. (Pull #155)516 - Fix `URL.join(...)` to work similarly to RFC 3986 URL joining. (Pull #144)517 518+---519+520 ## 0.6.8 (July 25, 2019)521 522 - Check for disconnections when searching for an available523 connection in `ConnectionPool.keepalive_connections` (Pull #145)40 unmodified linesmodified:README.md+2 added-2 removed
14 unmodified lines15 16 HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.17 18 **Note**: _HTTPX should be considered in beta. We believe we've got the public API to19-a stable point now, but would strongly recommend pinning your dependencies to the `0.13.*`20-release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md). A 1.0 release is expected to be issued sometime around mid-2020._19+a stable point now, but would strongly recommend pinning your dependencies to the `0.14.*`20+release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md). A 1.0 release is expected to be issued sometime around september 2020._21 22 ---23 24 Let's get started...109 unmodified lines