diff mbox series

[meta-python,09/18] python3-httpx2: Upgrade 2.16.2 -> 2.17.0

Message ID 20261201203145.3954930-9-leon.anavi@konsulko.com
State Under Review
Headers show
Series [meta-python,01/18] python3-astroid: Upgrade 4.3.4 -> 4.4.0 | expand

Commit Message

Leon Anavi Dec. 1, 2026, 8:31 p.m. UTC
Upgrade to release 2.17.0:

Less CPU per request, and pools that scale:

httpx2 and httpcore2 2.17.0 are a minor release. Requests cost less CPU,
and the cost no longer climbs steeply with the number of pooled
connections. Proxy options, IPv6 zones and cookies also change behaviour
in a few places, so read those sections before you upgrade.

- Idle connections no longer slow down every request.
  httpcore2 polled every idle HTTP/1.1 socket at the start and end
  of each request. It now checks only the connection it is about to
  reuse. A connection that the server closed stays in the pool
  until it is reused, its keep-alive expires, or it is evicted.
- Repeated URLs are parsed once. The 128 most recent URL
  strings of up to 2,048 characters are cached. The cached strings,
  including any credentials in them, stay in memory until they are
  evicted.
- Less fixed work on every request. An empty cancellation shield, a
  copy of the client headers, and a repeated socket lookup are
  skipped.

Transport options now reach the proxy:

- uds, local_address, retries and socket_options apply to HTTP
  proxy connections. HTTPTransport and AsyncHTTPTransport
  silently ignored them when proxy was set. If you already pass
  them together with a proxy, they now take effect. For example,
  uds sends the proxy connection over the Unix socket.
- retries works with SOCKS proxies. The TCP connection to
  the proxy is retried with the same backoff as a direct
  connection. SOCKS proxies still do not support uds, local_address
  and socket_options.

IPv6 zones and cookies:

- [fe80::1%25en0] and [fe80::1%en0] are the same host.
  URL.host returns the zone decoded, as fe80::1%en0, and str(url)
  and URL.netloc always write %25. A URL in the %25 form failed to
  connect before. Cookies saved under a bare %en0 URL no longer
  match after upgrading.
- The zone is not sent in the Host header. A request to
  http://[fe80::1%en0]/ sent Host: [fe80::1%en0], which servers
  such as Apache and lighttpd reject.
- Cookie handling no longer slows down with long URLs. The
  cookie jar gets the request URL without userinfo, query or
  fragment, and with at most 1024 bytes of path. A response to a
  URL whose directory is longer than 1024 bytes sets and deletes no
  cookies, and http://user:pass@example.org/ now shares cookies
  with http://example.org/.
- Copying Cookies keeps its policy. A policy on the client
  jar, such as one with blocked_domains, was ignored on requests
  that passed cookies=.

Responses, timeouts and errors:

- Open streamed responses no longer raise at shutdown.
  RuntimeError: aclose(): asynchronous generator is already running
  could appear when the event loop shut down, or the garbage
  collector ran, with streamed responses still open.
  Response.aiter_bytes() no longer calls aiter_raw(), so overriding
  aiter_raw() no longer affects aiter_bytes(), aiter_text(),
  aiter_lines() and aread().
- Response.aclose() can be retried. After a close that was
  cancelled or raised, the response was already marked as closed
  and the stream stayed open. A second call now closes it.
- response.elapsed is set for responses that arrive closed.
  It raised RuntimeError when a transport returned a loaded
  response, such as a MockTransport handler returning Response(200,
  json=...).
- Timeout rejects unsupported values when it is built. A
  value such as an httpx.Timeout now raises TypeError up front.
  Before, the request failed later, while connecting.
- Header encoding errors name the header. The
  UnicodeEncodeError for a header value that cannot be encoded now
  ends with (header 'auth').

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 .../{python3-httpx2_2.16.2.bb => python3-httpx2_2.17.0.bb}      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-httpx2_2.16.2.bb => python3-httpx2_2.17.0.bb} (86%)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-httpx2_2.16.2.bb b/meta-python/recipes-devtools/python/python3-httpx2_2.17.0.bb
similarity index 86%
rename from meta-python/recipes-devtools/python/python3-httpx2_2.16.2.bb
rename to meta-python/recipes-devtools/python/python3-httpx2_2.17.0.bb
index 7469a914d2..0226453c3a 100644
--- a/meta-python/recipes-devtools/python/python3-httpx2_2.16.2.bb
+++ b/meta-python/recipes-devtools/python/python3-httpx2_2.17.0.bb
@@ -2,7 +2,7 @@  SUMMARY = "The next generation HTTP client."
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=166cfc32dc0986f87a7e950553b52e5e"
 
-SRC_URI[sha256sum] = "748b615678f07d8e3b183efe81ad13b655ca88bfc56ce4589219b2d442860574"
+SRC_URI[sha256sum] = "807d9eb393c8d8c20accf33a6a596343dfda6c7cdbcb972ed4163c900dcdf89f"
 
 inherit pypi python_hatchling