NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #33 most downloaded on PyPI
The next generation HTTP client.
Last release 1 months ago
31 Aug 2026
Release timing varies
gaps range from 8 days to 11 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
77 releases · first in 2019
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
Nothing published for this version
Nothing published for this version
Fix SSL case where verify=False together with client side certificates.
verify=False together with client side certificates.The 0.28 release includes a limited set of deprecations.
The 0.28 release includes a limited set of deprecations.
Deprecations:
We are working towards a simplified SSL configuration API.
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...
verify argument as a string argument is now deprecated and will raise warnings.cert argument is now deprecated and will raise warnings.Our revised SSL documentation covers how to implement the same behaviour with a more constrained API.
The following changes are also included:
proxies argument has now been removed.app argument has now been removed.certifi and httpcore are only imported if required. (#3377)socks5h as a valid proxy scheme. (#3178)Request() method signature in line with client.request() and httpx.request(). (#3378)params={}, always strictly update rather than merge with an existing querystring. (#3364)Be aware that the default JSON request bodies now use a more compact representation. This is generally considered a prefered style, tho may require updates to test suites.
The 0.28 release includes a limited set of deprecations...
Deprecations:
We are working towards a simplified SSL configuration API.
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...
verify argument as a string argument is now deprecated and will raise warnings.cert argument is now deprecated and will raise warnings.Our revised SSL documentation covers how to implement the same behaviour with a more constrained API.
The following changes are also included:
proxies argument has now been removed.app argument has now been removed.certifi and httpcore are only imported if required. (#3377)socks5h as a valid proxy scheme. (#3178)Request() method signature in line with client.request() and httpx.request(). (#3378)params={}, always strictly update rather than merge with an existing querystring. (#3364)Reintroduced supposedly-private URLTypes shortcut.
URLTypes shortcut. (#2673)URLTypes shortcut. (#2673)Support for zstd content decoding using the python zstandard package is added. Installable using httpx[zstd].
zstd content decoding using the python zstandard package is added. Installable using httpx[zstd]. (#3139)InvalidURL exceptions. (#3250)app type signature in ASGITransport. (#3109)The app=... shortcut has been deprecated. Use the explicit style of transport=httpx.WSGITransport() or transport=httpx.ASGITransport() instead.
app=... shortcut has been deprecated. Use the explicit style of transport=httpx.WSGITransport() or transport=httpx.ASGITransport() instead.http1 argument while configuring proxy transports. (#3023)The proxy argument was added. You should use the proxy argument instead of the deprecated proxies, or use mounts= for more complex configurations.
proxy argument was added. You should use the proxy argument instead of the deprecated proxies, or use mounts= for more complex configurations. (#2879)proxies argument is now deprecated. It will still continue to work, but it will be removed in the future. (#2879)NO_PROXY envvar cases when a fully qualified URL is supplied as the value. (#2741)raw_path does not include URL query component. (#2999)Response.iter_text() cannot yield empty strings. (#2998)Add missing type hints to few __init__() methods.
__init__() methods. (#2938)Raise ValueError on Response.encoding being set after Response.text has been accessed.
ValueError on Response.encoding being set after Response.text has been accessed. (#2852)Change the type of Extensions from Mapping[Str, Any] to MutableMapping[Str, Any].
Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#2803)socket_options argument to httpx.HTTPTransport and httpx.AsyncHTTPTransport classes. (#2716)Response.raise_for_status() method now returns the response instance. For example: data = httpx.get('...').raise_for_status().json(). (#2776)500 error response instead of exceptions when raise_app_exceptions=False is set on ASGITransport. (#2669)WSGITransport environs have a SERVER_PROTOCOL. (#2708)%2F in query parameters (#2723)httpstatuses.com for HTTP error reference (#2768)Provide additional context in some InvalidURL exceptions.
InvalidURL exceptions. (#2675)NO_PROXY environment variable. (#2659)NetRCAuth() to None to use the stdlib default. (#2667)The logging behaviour has been change to be more in-line with other standard Python logging usages. We no longer have a custom TRACE log level, and we
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)Response.iter_lines() method now matches the stdlib behaviour and does not include the newline characters. It also resolves a performance issue. (#2423)requests, but is in line with browser behavior in Chrome, Safari, and Firefox. Both options are RFC valid. (#2543)httpx.NetRCAuth() authentication class. See the documentation at https://www.python-httpx.org/advanced/#netrc-support (#2525)rfc3986 dependancy has been removed. (#2252)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 no
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. T…
Content-Length. (#2382)TypeError if content is passed a dict-instance. (#2495)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)Allow setting an explicit multipart boundary in Content-Type header.
Content-Type header. (#2278)tuple or list for multipart values, not just list. (#2355)str content for multipart upload files. (#2400).read/.aread from SyncByteStream/AsyncByteStream (#2407)RawURL. (#2241)Note: The 0.23.1 release should have used a proper version bump, rather than a minor point release. There are API surface area changes that may affect some users. See the "Removed" section of these release notes for details.
Content-Type header. (#2278)tuple or list for multipart values, not just list. (#2355)str content for multipart upload files. (#2400).read/.aread from SyncByteStream/AsyncByteStream. (#2407)RawURL. (#2241)Use utf-8 as the default character set, instead of falling back to charset-normalizer for auto-detection. To enable automatic character set detection,
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. (#2165)URL.copy_with for some oddly formed URL cases. (#2185)iter_bytes never yields zero-length chunks. (#2068)Authorization header for redirects that are to the same origin, but are an http-to-https upgrade. (#2074)<16086 bytes of binary data> instead. (#2076)--proxies argument in the command line client help. (#2125).request on HTTPError exceptions. (#2158)Support for the SOCKS5 proxy protocol via the `socksio` package.
socksio package. (#2034)__del__ with unclosed clients. (#2026)Headers.update(...) to correctly handle repeated headers (#2038)Fix streaming uploads using SyncByteStream or AsyncByteStream. Regression in 0.21.2.
SyncByteStream or AsyncByteStream. Regression in 0.21.2. (#2016)HTTP/2 support for tunnelled proxy cases.
The response.url property is now correctly annotated as URL, instead of Optional[URL].
response.url property is now correctly annotated as URL, instead of Optional[URL]. (#1940)The 0.21.0 release integrates against a newly redesigned httpcore backend.
The 0.21.0 release integrates against a newly redesigned httpcore backend.
Both packages ought to automatically update to the required versions, but if you are
seeing any issues, you should ensure that you have httpx==0.21.* and httpcore==0.14.* installed.
-v/--verbose is used.-v/--verbose is used.The 0.21.0 release integrates against a newly redesigned httpcore backend.
Both packages ought to automatically update to the required versions, but if you are
seeing any issues, you should ensure that you have httpx==0.21.* and httpcore==0.14.* installed.
-v/--verbose is used.-v/--verbose is used.The 0.20.0 release adds an integrated command-line client, and also includes some design changes. The most notable of these is that redirect responses
The 0.20.0 release adds an integrated command-line client, and also includes some design changes. The most notable of these is that redirect responses are no longer automatically followed, unless specifically requested.
This design decision prioritises a more explicit approach to redirects, in order to avoid code that unintentionally issues multiple requests as a result of misconfigured URLs.
For example, previously a client configured to send requests to http://api.github.com/ would end up sending every API request twice, as each request would be redirected to https://api.github.com/.
If you do want auto-redirect behaviour, you can enable this either by configuring the client instance with Client(follow_redirects=True), or on a per-request basis, with .get(..., follow_redirects=True).
This change is a classic trade-off between convenience and precision, with no "right" answer. See discussion #1785 for more context.
The other major design change is an update to the Transport API, which is the low-level interface against which requests are sent. Previously this interface used only primitive datastructures, like so...
(status_code, headers, stream, extensions) = transport.handle_request(method, url, headers, stream, extensions)
try
...
finally:
stream.close()
Now the interface is much simpler...
response = transport.handle_request(request)
try
...
finally:
response.close()
allow_redirects flag is now follow_redirects and defaults to False.raise_for_status() method will now raise an exception for any responses except those with 2xx status codes. Previously only 4xx and 5xx status codes would result in an exception.response = transport.handle_request(request).client.send() method no longer accepts a timeout=... argument, but the client.build_request() does. This required by the signature change of the Transport API. The request timeout configuration is now stored on the request instance, as request.extensions['timeout'].httpx command-line client..is_informational, .is_success, .is_redirect, .is_client_error, and .is_server_error 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.response.iter_bytes() no longer raises a ValueError when called on a response with no content. (Pull #1827)'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 confguration. (Pull #1828)Add support for Client(allow_redirects= ). (Pull #1790)
Client(allow_redirects=<bool>). (Pull #1790)charset is included in the response Content-Type header. (Pull #1791)mode argument from httpx.Proxy(..., mode=...). (Pull #1795)Support for Python 3.10. (Pull #1687)
httpx.USE_CLIENT_DEFAULT, used as the default to auth and timeout parameters in request methods. (Pull #1634)httpx.Client(http1=False, http2=True). (Pull #1624)Update brotli support to use the brotlicffi package (Pull #1605)
brotlicffi package (Pull #1605)Request(..., stream=...) does not auto-generate any headers on the request instance. (Pull #1607)timeout=... in top-level httpx.stream() function. (Pull #1613)The following API changes have been issuing deprecation warnings since 0.17.0 onwards, and are now fully deprecated...
The 0.18.x release series formalises our low-level Transport API, introducing the base classes httpx.BaseTransport and httpx.AsyncBaseTransport.
See the "Writing custom transports" documentation and the httpx.BaseTransport.handle_request() docstring for more complete details on implementing custom transports.
Pull request #1522 includes a checklist of differences from the previous httpcore transport API, for developers implementing custom transports.
The following API changes have been issuing deprecation warnings since 0.17.0 onwards, and are now fully deprecated...
httpx.BaseTransport or httpx.AsyncBaseTransport,
and should implement either the handle_request method or handle_async_request method. (Pull #1522, #1550)response.ext property and Response(ext=...) argument are now named extensions. (Pull #1522)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)Response(on_close=...) from API, since it was a bit of leaking implementation detail. (Pull #1572)httpx.ResponseClosed is now named httpx.StreamClosed. (#1584)httpx.QueryParams model now presents an immutable interface. The is a discussion on the design and motivation here. 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)Request and Response classes can now be serialized using pickle. (#1579)data={"key": [None|int|float|bool]} cases. (Pull #1539)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)url.copy_with(params=...). (Pull #1601)url.params parameter, returning an immutable QueryParams instance. (Pull #1601)url.copy_set_param(), url.copy_add_param(), url.copy_remove_param(), url.copy_merge_params(). (Pull #1601)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)URL.host property returns unicode strings for internationalized domain names. The URL.raw_host property returns byte strings with IDNA escaping applied. (Pull #1590)files=... where unicode string is used as the file content. (Pull #1537)Client(base_url=...). (Pull #1532)request.content attribute is now always available except for streaming content, which requires an explicit .read(). (Pull #1583)Type annotation on CertTypes allows keyfile and password to be optional. (Pull #1503)
CertTypes allows keyfile and password to be optional. (Pull #1503)Add httpx.MockTransport(), allowing to mock out a transport using pre-determined responses. (Pull #1401, Pull #1449)
httpx.MockTransport(), allowing to mock out a transport using pre-determined responses. (Pull #1401, Pull #1449)httpx.HTTPTransport() and httpx.AsyncHTTPTransport() default transports. (Pull #1399)httpx.Client(mounts=...). (Pull #1362)chunk_size parameter to iter_raw(), iter_bytes(), iter_text(). (Pull #1277)keepalive_expiry parameter to httpx.Limits() configuration. (Pull #1398)httpx.Cookies to display available cookies. (Pull #1411)params=<tuple> (previously only params=<list> was supported). (Pull #1426)raw_path to ASGI scope. (Pull #1357)create_ssl_context defaults to use trust_env=True. (Pull #1447)PATH_INFO. (Pull #1391)base_url. (Pull #1407)request.aclose(). (Pull #1465)Support literal IPv6 addresses in URLs. (Pull #1349)
Preserve HTTP header casing. (Pull #1338, encode/httpcore#216, python-hyper/h11#104)
response.next() and response.anext() methods in favour of response.next_request attribute. (Pull #1339)__enter__/__exit__/__aenter__/__aexit__ in a way that supports subclasses of Client and AsyncClient. (Pull #1336)Add response.next_request (Pull ##1334)
response.next_request (Pull ##1334)Support direct comparisons between Headers and dicts or lists of two-tuples. Eg. assert response.headers == {"Content-Length": 24} (Pull #1326)
Headers and dicts or lists of two-tuples. Eg. assert response.headers == {"Content-Length": 24} (Pull #1326).read() when Response instances are created with content=<str> (Pull #1324)Fixed connection leak in async client due to improper closing of response streams. (Pull #1316)
Fixed response.elapsed property. (Pull #1313)
response.elapsed property. (Pull #1313).stream(). (Pull #1312)ASGITransport now properly applies URL decoding to the path component, as-per the ASGI spec. (Pull #1307)
path component, as-per the ASGI spec. (Pull #1307)Added support for curio. (Pull https://github.com/encode/httpcore/pull/168)
response.num_bytes_downloaded. (Pull #1268)Request(content=...) for byte content, instead of overloading Request(data=...) (Pull #1266)url.copy_with(...). (Pull #1285)Request instances, vs default client.headers. (Pull #1248)AsyncClient instances will now raise warnings if garbage collected. (Pull #1197)Response(content=..., text=..., html=..., json=...) for creating usable response instances in code. (Pull #1265, #1297)url.path is now URL escaped. (Pull #1285)url.userinfo and url.query are not URL escaped, and so return bytes. (Pull #1285)url.authority property in favour of url.netloc, since "authority" was semantically incorrect. (Pull #1285)url.full_path property in favour of url.raw_path, for better consistency with other parts of the API. (Pull #1285)chardet library for auto-detecting charsets, instead defaulting to a simpler approach when no charset is specified. (#1269).netrc lookups should use host, not host+port. (Pull #1298)URLLib3Transport class no longer exists. We've published it instead as an example of a custom transport class. (Pull #1182)request.timer attribute, which was being used internally to set response.elapsed. (Pull #1249)response.decoder attribute, which was being used internally. (Pull #1276)Request.prepare() is now a private method. (Pull #1284)response.num_bytes_downloaded. (Pull #1268)Request(content=...) for byte content, instead of overloading Request(data=...) (Pull #1266)url.copy_with(...). (Pull #1285)Request instances, vs default client.headers. (Pull #1248)AsyncClient instances will now raise warnings if garbage collected. (Pull #1197)Response(content=..., text=..., html=..., json=...) for creating usable response instances in code. (Pull #1265, #1297)url.path is now URL escaped. (Pull #1285)url.userinfo and url.query are not URL escaped, and so return bytes. (Pull #1285)url.authority property in favour of url.netloc, since "authority" was semantically incorrect. (Pull #1285)url.full_path property in favour of url.raw_path, for better consistency with other parts of the API. (Pull #1285)chardet library for auto-detecting charsets, instead defaulting to a simpler approach when no charset is specified. (#1269).netrc lookups should use host, not host+port. (Pull #1298)URLLib3Transport class no longer exists. We've published it instead as an example of a custom transport class. (Pull #1182)request.timer attribute, which was being used internally to set response.elapsed. (Pull #1249)response.decoder attribute, which was being used internally. (Pull #1276)Request.prepare() is now a private method. (Pull #1284)Headers.getlist() method had previously been deprecated in favour of Headers.get_list(). It is now fully removed.QueryParams.getlist() method had previously been deprecated in favour of QueryParams.get_list(). It is now fully removed.URL.is_ssl property had previously been deprecated in favour of URL.scheme == "https". It is now fully removed.httpx.PoolLimits class had previously been deprecated in favour of httpx.Limits. It is now fully removed.max_keepalive setting had previously been deprecated in favour of the more explicit max_keepalive_connections. It is now fully removed.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.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.http.Response() may now be instantiated without a request=... parameter. Useful for some unit testing cases. (Pull #1238)
http.Response() may now be instantiated without a request=... parameter. Useful for some unit testing cases. (Pull #1238)103 Early Hints and 425 Too Early status codes. (Pull #1244)DigestAuth now handles responses that include multiple 'WWW-Authenticate' headers. (Pull #1240)__enter__/__exit__ or __aenter__/__aexit__ when client is used in a context manager style. (Pull #1218)Support client.get(..., auth=None) to bypass the default authentication on a clients. (Pull #1115)
client.get(..., auth=None) to bypass the default authentication on a clients. (Pull #1115)client.auth = ... property setter. (Pull #1185)httpx.get(..., proxies=...) on top-level request functions. (Pull #1198)cookies=[(key, value)] list-of-two-tuples style usage. (Pull #1211)Content-Length header on streaming requests. (Pull #1170)HEAD requests, setting allow_redirects=True. (Pull #1183)httpx exception, not the underlying httpcore exception. (Pull #1190)httpcore traceback, when transport exceptions occur. (Pull #1199)The httpx.URL(...) class now raises httpx.InvalidURL on invalid URLs, rather than exposing the underlying rfc3986 exception. If a redirect response in
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)Set-Cookie headers became broken in the 0.14.0 release, and is now resolved. (Pull #1156)When upgrading you should be aware of the following public API changes. Note that deprecated usages will currently continue to function, but will issu…
The 0.14 release includes a range of improvements to the public API, intended on preparing for our upcoming 1.0 release.
pip install httpx[http2] if you want to include the HTTP/2 dependancies.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.httpx.HTTPError usage, but we've got a clearer overall structure now. See https://www.python-httpx.org/exceptions/ for more details.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.
httpx.codes consistently in favour of httpx.StatusCodes.httpx.Timeout() should now always include an explicit default. Eg. httpx.Timeout(None, pool=5.0).httpx.Timeout(), we now have more concisely named keyword arguments. Eg. read=5.0, instead of read_timeout=5.0.httpx.Limits() instead of httpx.PoolLimits(), and limits=... instead of pool_limits=....httpx.Limits(max_keepalive=...) argument is now deprecated in favour of a more explicit httpx.Limits(max_keepalive_connections=...)Client(proxies={...}) should now be in the style of {"http://": ...}, rather than {"http": ...}.Headers.getlist() and QueryParams.getlist() are deprecated in favour of more consistent .get_list() variants.URL.is_ssl property is deprecated in favour of URL.scheme == "https".URL.join(relative_url=...) method is now URL.join(url=...). This change does not support warnings for the deprecated usage style.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.
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.
These changes should not affect users who have been working from the httpx documentation.
.merge_url(), .merge_headers(), .merge_cookies(), .merge_queryparams().build_auth(), .build_redirect_request().redirect_method(), .redirect_url(), .redirect_headers(), .redirect_stream().send_handling_redirects(), .send_handling_auth(), .send_single_request().init_transport(), .init_proxy_transport().proxies, .transport, .netrc, .get_proxy_map()See pull requests #997, #1065, #1071.
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.
ASGIDispatch, WSGIDispatch, which have been replaced by ASGITransport, WSGITransport.dispatch=...`` on client, which has been replaced by transport=...``soft_limit, hard_limit, which have been replaced by max_keepalive and max_connections.Response.stream and Response.raw, which have been replaced by ``.aiter_bytes and .aiter_raw.proxies=<transport instance> in favor of proxies=httpx.Proxy(...).See pull requests #1057, #1058.
### Added
httpx.HTTPStatusError for .raise_for_status() exceptions. (Pull #1072)httpx.create_ssl_context() helper function. (Pull #996)proxies={"https://www.example.com": None}. (Pull #1099)QueryParams(None) and client.params = None. (Pull #1060)httpx.codes consistently in favour of httpx.StatusCodes which is placed into deprecation. (Pull #1088)httpx.Timeout() should now always include an explicit default. Eg. httpx.Timeout(None, pool=5.0). (Pull #1085)httpx.Timeout() keyword arguments. Eg. read=5.0, instead of read_timeout=5.0. (Pull #1111)httpx.Limits() instead of httpx.PoolLimits(), and limits=... instead of pool_limits=.... (Pull #1113)httpx.Limits(max_keepalive=...) argument is now deprecated in favour of a more explicit httpx.Limits(max_keepalive_connections=...).Client(proxies={...}) should now be in the style of {"http://": ...}, rather than {"http": ...}. (Pull #1127)Headers.getlist and QueryParams.getlist are deprecated in favour of more consistent .get_list() variants. (Pull #1089)URL.port becomes Optional[int]. Now only returns a port if one is explicitly included in the URL string. (Pull #1080)URL(..., allow_relative=[bool]) parameter no longer exists. All URL instances may be relative. (Pull #1073)url.full_path = ... property setter. (Pull #1069)URL.join(relative_url=...) method is now URL.join(url=...). (Pull #1129)URL.is_ssl property is deprecated in favour of URL.scheme == "https". (Pull #1128)Response.next() method. (Pull #1055)Response.iter_lines(). (Pull #1033, #1075).netrc files. (Pull #1104)HTTP_PROXY etc... environment variables. (Pull #1120)app=... or transport=... bypasses any environment based proxy defaults. (Pull #1122).base_url when a path component is included in the base URL. (Pull #1130)Include missing keepalive expiry configuration. (Pull #1005)
Include explicit "Content-Length: 0" on POST, PUT, PATCH if no request body is used. (Pull #995)
http2 option to httpx.Client. (Pull #982)Fix pool options deprecation warning. (Pull #980)
httpx.URLLib3ProxyTransport in top-level API. (Pull #979)When customizing the transport use transport=.... The ASGIDispatch and WSGIDispatch class naming is deprecated in favour of ASGITransport and WSGITran…
This release switches to httpcore for all the internal networking, which means:
urllib3 dependency for our sync client, although there is still an optional URLLib3Transport class.It 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.
We also now have a public "Transport API", which you can use to implement custom transport implementations against. This formalises and replaces our previously private "Dispatch API".
httpcore for underlying HTTP transport. Drop urllib3 requirement. (Pull #804, #967)soft_limit/hard_limit to max_keepalive/max_connections. (Pull #968)transport=.... The ASGIDispatch and WSGIDispatch class naming is deprecated in favour of ASGITransport and WSGITransport. (Pull #963)URLLib3Transport class for optional urllib3 transport support. (Pull #804, #963)Response.stream and Response.raw. (Pull #908)files=.... (Pull #976)Client(uds=...) (Pull #804)The 0.13.0.dev2 is a pre-release version. To install it, use pip install httpx --pre.
app=<ASGI app> observe neater disconnect behaviour instead of sending empty body messages. (Pull #919)The 0.13.0.dev2 is a *pre-release* version. To install it, use pip install httpx --pre.
The 0.13.0.dev2 is a pre-release version. To install it, use pip install httpx --pre.
app=<ASGI app> observe neater disconnect behaviour instead of sending empty body messages. (Pull #919)The 0.13.0.dev1 is a *pre-release* version. To install it, use pip install httpx --pre.
The 0.13.0.dev1 is a pre-release version. To install it, use pip install httpx --pre.
http2 flag to proxy dispatchers. (Pull #934)httpcore v0.8.3
which addresses problems in handling of headers when using proxies.Nothing published for this version
Resolved packaging issue, where additional files were being included.
The 0.12 release tightens up the API expectations for httpx by switching to private module names to enforce better clarity around public API.
The 0.12 release tightens up the API expectations for httpx by switching to private module names to enforce better clarity around public API.
All 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.
.requires_response_body. (Pull #803)NetworkError exception. (Pull #814)NO_PROXY environment variable. (Pull #835)RedirectLoop exception, instead using TooManyRedirects. (Pull #819)backend=... parameter on AsyncClient, in favour of always autodetecting trio/asyncio. (Pull #791)httpx.Proxy(url, mode="FORWARD_ONLY") configuration. (Pull #788)cert parameters even if verify=False. (Pull #796)data=.... (Pull #811)Fixed usage of proxies=... on Client(). (Pull #763)
proxies=... on Client(). (Pull #763)zlib and deflate style encodings on Content-Encoding: deflate. (Pull #758)allow_redirects=False. (Pull #766)The 0.11 release reintroduces our sync support, so that httpx now supports both a standard thread-concurrency API, and an async API.
The 0.11 release reintroduces our sync support, so that httpx now supports both a standard thread-concurrency API, and an async API.
Existing async httpx users that are upgrading to 0.11 should ensure that:
httpx.AsyncClient(), instead of httpx.Client().httpx.Proxy() class, instead of the previous httpx.HTTPProxy(). This new configuration class works for configuring both sync and async clients.We believe the API is now pretty much stable, and are aiming for a 1.0 release sometime on or before April 2020.
httpx.get(url, ...), httpx.post(url, ...), httpx.request(method, url, ...) becomes synchronous.httpx.Client() for synchronous clients, with httpx.AsyncClient being used for async clients.proxies=httpx.Proxy(...) for proxy configuration.httpx.NetworkError, rather than exposing lower-level exception types directly.request.url.origin property and httpx.Origin class are no longer available.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.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.(method, url) rather than url. (Pull #734)Fix issue with concurrent connection acquisition. (Pull #700)
The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces.
The 0.10.0 release makes some changes that will allow us to support both sync and async interfaces.
In particular with streaming responses the response.read() method becomes response.aread(), and the response.close() method becomes response.aclose().
If following redirects explicitly the response.next() method becomes response.anext().
Response.request: switch from Optional[Request] to Request. (Pull #666)Response.elapsed now reflects the entire download time. (Pull #687, #692)AsyncClient as a synonym for Client. (Pull #680)response.aread() for conditionally reading streaming responses. (Pull #674)response.aclose() and client.aclose() for explicit closing. (Pull #674, #675)response.anext() for resolving the next redirect response. (Pull #676)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)request.read(), since end users should not require it.Fix Host header and HSTS rewrites when an explicit :80 port is included in URL. (Pull #649)
:80 port is included in URL. (Pull #649)params=... argument. (Pull #653)Content-Type header to take precedence over the encoding default. (Pull #633)Added expiry to Keep-Alive connections, resolving issues with acquiring connections. (Pull #627)
Your coding agent can read these notes before it upgrades. Set up the MCP server →