All Versions
63
Latest Version
Avg Release Cycle
28 days
Latest Release
993 days ago

Changelog History
Page 3

  • v0.15.0 Changes

    September 22, 2020

    โž• Added

    • โž• Added support for curio. (Pull https://github.com/encode/httpcore/pull/168)
    • โž• Added support for event hooks. (Pull #1246)
    • โž• Added support for authentication flows which require either sync or async I/O. (Pull #1217)
    • Added support for monitoring download progress with response.num_bytes_downloaded. (Pull #1268)
    • โž• Added Request(content=...) for byte content, instead of overloading Request(data=...) (Pull #1266)
    • โž• Added support for all URL components as parameter names when using url.copy_with(...). (Pull #1285)
    • 0๏ธโƒฃ Neater split between automatically populated headers on Request instances, vs default client.headers. (Pull #1248)
    • โš  Unclosed AsyncClient instances will now raise warnings if garbage collected. (Pull #1197)
    • ๐Ÿ‘Œ Support Response(content=..., text=..., html=..., json=...) for creating usable response instances in code. (Pull #1265, #1297)
    • ๐Ÿ‘Œ Support instantiating requests from the low-level transport API. (Pull #1293)
    • ๐Ÿšฉ Raise errors on invalid URL types. (Pull #1259)

    ๐Ÿ”„ Changed

    • Cleaned up expected behaviour for URL escaping. url.path is now URL escaped. (Pull #1285)
    • 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)
    • โฌ‡๏ธ Drop url.authority property in favour of url.netloc, since "authority" was semantically incorrect. (Pull #1285)
    • Drop url.full_path property in favour of url.raw_path, for better consistency with other parts of the API. (Pull #1285)
    • 0๏ธโƒฃ No longer use the chardet library for auto-detecting charsets, instead defaulting to a simpler approach when no charset is specified. (#1269)

    ๐Ÿ›  Fixed

    • Swapped ordering of redirects and authentication flow. (Pull #1267)
    • .netrc lookups should use host, not host+port. (Pull #1298)

    โœ‚ Removed

    • The URLLib3Transport class no longer exists. We've published it instead as an example of a custom transport class. (Pull #1182)
    • โฌ‡๏ธ Drop request.timer attribute, which was being used internally to set response.elapsed. (Pull #1249)
    • โฌ‡๏ธ Drop response.decoder attribute, which was being used internally. (Pull #1276)
    • Request.prepare() is now a private method. (Pull #1284)
    • ๐Ÿšš The Headers.getlist() method had previously been deprecated in favour of Headers.get_list(). It is now fully removed.
    • ๐Ÿšš The QueryParams.getlist() method had previously been deprecated in favour of QueryParams.get_list(). It is now fully removed.
    • ๐Ÿšš The URL.is_ssl property had previously been deprecated in favour of URL.scheme == "https". It is now fully removed.
    • ๐Ÿšš The httpx.PoolLimits class had previously been deprecated in favour of httpx.Limits. It is now fully removed.
    • ๐Ÿ—„ The max_keepalive setting had previously been deprecated in favour of the more explicit max_keepalive_connections. It is now fully removed.
    • ๐Ÿ’… 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.
    • ๐Ÿ‘Œ 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.
  • v0.14.3 Changes

    September 02, 2020

    0.14.3 (September 2nd, 2020)

    โž• Added

    • โœ… http.Response() may now be instantiated without a request=... parameter. Useful for some unit testing cases. (Pull #1238)
    • โž• Add 103 Early Hints and 425 Too Early status codes. (Pull #1244)

    ๐Ÿ›  Fixed

    • DigestAuth now handles responses that include multiple 'WWW-Authenticate' headers. (Pull #1240)
    • Call into transport __enter__/__exit__ or __aenter__/__aexit__ when client is used in a context manager style. (Pull #1218)
  • v0.14.2 Changes

    August 24, 2020

    0.14.2 (August 24th, 2020)

    โž• Added

    • ๐Ÿ‘Œ Support client.get(..., auth=None) to bypass the default authentication on a clients. (Pull #1115)
    • ๐Ÿ‘Œ Support client.auth = ... property setter. (Pull #1185)
    • ๐Ÿ‘Œ Support httpx.get(..., proxies=...) on top-level request functions. (Pull #1198)
    • ๐Ÿ’… Display instances with nicer import styles. (Eg. <httpx.ReadTimeout ...>) (Pull #1155)
    • ๐Ÿ‘Œ Support cookies=[(key, value)] list-of-two-tuples style usage. (Pull #1211)

    ๐Ÿ›  Fixed

    • Ensure that automatically included headers on a request may be modified. (Pull #1205)
    • ๐Ÿ‘ Allow explicit Content-Length header on streaming requests. (Pull #1170)
    • ๐Ÿ– Handle URL quoted usernames and passwords properly. (Pull #1159)
    • 0๏ธโƒฃ Use more consistent default for HEAD requests, setting allow_redirects=True. (Pull #1183)
    • ๐Ÿ‘ป If a transport error occurs while streaming the response, raise an httpx exception, not the underlying httpcore exception. (Pull #1190)
    • Include the underlying httpcore traceback, when transport exceptions occur. (Pull #1199)
  • v0.14.1 Changes

    August 11, 2020

    0.14.1 (August 11th, 2020)

    โž• Added

    • ๐Ÿ‘ป 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)

    ๐Ÿ›  Fixed

    • ๐Ÿš€ Handling multiple Set-Cookie headers became broken in the 0.14.0 release, and is now resolved. (Pull #1156)
  • v0.14.0 Changes

    August 07, 2020

    0.14.0 (August 7th, 2020)

    ๐Ÿš€ The 0.14 release includes a range of improvements to the public API, intended on preparing for our upcoming 1.0 release.

    • 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.
    • ๐Ÿšš 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.
    • ๐Ÿ‘€ 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.

    โฌ†๏ธ 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.

    • You should now use httpx.codes consistently in favour of httpx.StatusCodes.
    • 0๏ธโƒฃ Usage of httpx.Timeout() should now always include an explicit default. Eg. httpx.Timeout(None, pool=5.0).
    • โฑ When using httpx.Timeout(), we now have more concisely named keyword arguments. Eg. read=5.0, instead of read_timeout=5.0.
    • ๐Ÿ‘‰ Use httpx.Limits() instead of httpx.PoolLimits(), and limits=... instead of pool_limits=....
    • ๐Ÿ—„ The httpx.Limits(max_keepalive=...) argument is now deprecated in favour of a more explicit httpx.Limits(max_keepalive_connections=...)
    • ๐Ÿ’… Keys used with Client(proxies={...}) should now be in the style of {"http://": ...}, rather than {"http": ...}.
    • ๐Ÿ—„ The multidict methods Headers.getlist() and QueryParams.getlist() are deprecated in favour of more consistent .get_list() variants.
    • ๐Ÿ—„ The URL.is_ssl property is deprecated in favour of URL.scheme == "https".
    • ๐Ÿ’… The 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.

    • โฌ‡๏ธ Drop ASGIDispatch, WSGIDispatch, which have been replaced by ASGITransport, WSGITransport.
    • โฌ‡๏ธ Drop dispatch=...on client, which has been replaced bytransport=...``
    • Drop soft_limit, hard_limit, which have been replaced by max_keepalive and max_connections.
    • Drop Response.stream andResponse.raw, which have been replaced by.aiter_bytes and .aiter_raw.
    • โฌ‡๏ธ Drop proxies=<transport instance> in favor of proxies=httpx.Proxy(...).

    ๐Ÿ‘€ See pull requests #1057, #1058.

     Added

    • Added dedicated exception class httpx.HTTPStatusError for .raise_for_status() exceptions. (Pull #1072)
    • Added httpx.create_ssl_context() helper function. (Pull #996)
    • ๐Ÿ‘Œ Support for proxy exlcusions like proxies={"https://www.example.com": None}. (Pull #1099)
    • ๐Ÿ‘Œ Support QueryParams(None) and client.params = None. (Pull #1060)

    ๐Ÿ”„ Changed

    • ๐Ÿ—„ Use httpx.codes consistently in favour of httpx.StatusCodes which is placed into deprecation. (Pull #1088)
    • 0๏ธโƒฃ Usage of httpx.Timeout() should now always include an explicit default. Eg. httpx.Timeout(None, pool=5.0). (Pull #1085)
    • โฑ Switch to more concise httpx.Timeout() keyword arguments. Eg. read=5.0, instead of read_timeout=5.0. (Pull #1111)
    • ๐Ÿ‘‰ Use httpx.Limits() instead of httpx.PoolLimits(), and limits=... instead of pool_limits=.... (Pull #1113)
    • ๐Ÿ—„ The httpx.Limits(max_keepalive=...) argument is now deprecated in favour of a more explicit httpx.Limits(max_keepalive_connections=...).
    • ๐Ÿ’… Keys used with Client(proxies={...}) should now be in the style of {"http://": ...}, rather than {"http": ...}. (Pull #1127)
    • ๐Ÿ—„ The multidict methods 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)
    • The URL(..., allow_relative=[bool]) parameter no longer exists. All URL instances may be relative. (Pull #1073)
    • โฌ‡๏ธ Drop unnecessary url.full_path = ... property setter. (Pull #1069)
    • The URL.join(relative_url=...) method is now URL.join(url=...). (Pull #1129)
    • ๐Ÿ—„ The URL.is_ssl property is deprecated in favour of URL.scheme == "https". (Pull #1128)

    ๐Ÿ›  Fixed

    • โž• Add missing Response.next() method. (Pull #1055)
    • ๐Ÿ‘ป Ensure all exception classes are exposed as public API. (Pull #1045)
    • ๐Ÿ‘Œ Support multiple items with an identical field name in multipart encodings. (Pull #777)
    • Skip HSTS preloading on single-label domains. (Pull #1074)
    • ๐Ÿ›  Fixes for Response.iter_lines(). (Pull #1033, #1075)
    • Ignore permission errors when accessing .netrc files. (Pull #1104)
    • ๐Ÿ‘ Allow bare hostnames in HTTP_PROXY etc... environment variables. (Pull #1120)
    • 0๏ธโƒฃ Settings app=... or transport=... bypasses any environment based proxy defaults. (Pull #1122)
    • ๐Ÿ›  Fix handling of .base_url when a path component is included in the base URL. (Pull #1130)
  • v0.13.3 Changes

    May 29, 2020

    0.13.3 (May 29th, 2020)

    ๐Ÿ›  Fixed

    • ๐Ÿ”ง Include missing keepalive expiry configuration. (Pull #1005)
    • ๐Ÿ‘Œ Improved error message when URL redirect has a custom scheme. (Pull #1002)
  • v0.13.2 Changes

    May 27, 2020

    0.13.2 (May 27th, 2020)

    ๐Ÿ›  Fixed

    • Include explicit "Content-Length: 0" on POST, PUT, PATCH if no request body is used. (Pull #995)
    • โž• Add http2 option to httpx.Client. (Pull #982)
    • Tighten up API typing in places. (Pull #992, #999)
  • v0.13.1 Changes

    May 22, 2020

    0.13.1 (May 22nd, 2020)

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix pool options deprecation warning. (Pull #980)
    • Include httpx.URLLib3ProxyTransport in top-level API. (Pull #979)
  • v0.13.0 Changes

    May 22, 2020

    0.13.0 (May 22nd, 2020)

    ๐Ÿš€ This release switches to httpcore for all the internal networking, which means:

    • ๐Ÿ”€ We're using the same codebase for both our sync and async clients.
    • ๐Ÿ”€ HTTP/2 support is now available with the sync client.
    • We no longer have a 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".

    ๐Ÿ”„ Changed

    • ๐Ÿ‘‰ Use httpcore for underlying HTTP transport. Drop urllib3 requirement. (Pull #804, #967)
    • Rename pool limit options from soft_limit/hard_limit to max_keepalive/max_connections. (Pull #968)
    • ๐Ÿ—„ 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)

    โž• Added

    • โž• Added URLLib3Transport class for optional urllib3 transport support. (Pull #804, #963)
    • Streaming multipart uploads. (Pull #857)
    • ๐ŸŒฒ Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables
      ๐ŸŒฒ and TRACE level logging. (Pull encode/httpcore#79)

    ๐Ÿ›  Fixed

    • ๐ŸŽ Performance improvement in brotli decoder. (Pull #906)
    • ๐Ÿ—„ Proper warning level of deprecation notice in Response.stream and Response.raw. (Pull #908)
    • ๐Ÿ›  Fix support for generator based WSGI apps. (Pull #887)
    • Reuse of connections on HTTP/2 in close concurrency situations. (Pull encode/httpcore#81)
    • Honor HTTP/2 max concurrent streams settings (Pull encode/httpcore#89, encode/httpcore#90)
    • ๐Ÿ›  Fix bytes support in multipart uploads. (Pull #974)
    • ๐Ÿ‘Œ Improve typing support for files=.... (Pull #976)

    โœ‚ Removed

    • โฌ‡๏ธ Dropped support for Client(uds=...) (Pull #804)

    0.13.0.dev2 (May 12th, 2020)

    ๐Ÿš€ The 0.13.0.dev2 is a pre-release version. To install it, use pip install httpx --pre.

    โž• Added

    • ๐ŸŒฒ Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables
      ๐ŸŒฒ and TRACE level logging. (HTTPCore Pull #79)

    ๐Ÿ›  Fixed

    • Reuse of connections on HTTP/2 in close concurrency situations. (HTTPCore Pull #81)
    • When using an app=<ASGI app> observe neater disconnect behaviour instead of sending empty body messages. (Pull #919)
  • v0.13.0.dev2 Changes

    May 12, 2020

    0.13.0.dev2 (May 12th, 2020)

    ๐Ÿš€ The 0.13.0.dev2 is a pre-release version. To install it, use pip install httpx --pre.

    โž• Added

    • ๐ŸŒฒ Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables
      ๐ŸŒฒ and TRACE level logging. (HTTPCore Pull #79)

    ๐Ÿ›  Fixed

    • Reuse of connections on HTTP/2 in close concurrency situations. (HTTPCore Pull #81)
    • When using an app=<ASGI app> observe neater disconnect behaviour instead of sending empty body messages. (Pull #919)