Skip to content

chore(deps): bump httpx2 from 2.16.2 to 2.17.0 - #41

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/httpx2-2.17.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/httpx2-2.17.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 5, 2026

Copy link
Copy Markdown

Bumps httpx2 from 2.16.2 to 2.17.0.

Release notes

Sourced from httpx2's releases.

v2.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.

pip install --upgrade httpx2==2.17.0
  • Idle connections no longer slow down every request (#1352). 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 (#1256). 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 (#1372, #1375). 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 (#1172). 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 (#1172). 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 (#1361). 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 (#1360). 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 (#1342). 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 (#1314). 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 (#1281). 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 (#1353). 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 (#1376). 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 (#1348). 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 (#1371). The UnicodeEncodeError for a header value that cannot be encoded now ends with (header 'auth').

📊 Benchmark against 2.16.2

Requests per second for httpx2 2.16.2 and 2.17.0 in six scenarios

Scenario 2.16.2 2.17.0 Change
1 connection, GET 1 KiB 3,140 rps 4,143 rps +32%
16 connections, GET 1 KiB 3,981 rps 4,786 rps +20%
128 connections, GET 1 KiB 2,833 rps 3,712 rps +31%
512 connections, GET 1 KiB 498 rps 2,046 rps 4.1x
64 connections, GET 100 KiB 2,928 rps 3,631 rps +24%
64 connections, POST 1 KiB 3,322 rps 4,115 rps +24%

These are medians of 7 rounds of scripts/benchmark --mode read on local loopback (CPython 3.14, stdlib asyncio, macOS arm64). 2.17.0 was faster in every round of every scenario. They come from one machine, so read them as a direction, not a guarantee.

Full changelog: v2.16.2...v2.17.0

Changelog

Sourced from httpx2's changelog.

2.17.0 (November 30th, 2026)

Changed

  • Cache the parsed form of the 128 most recent URL strings of up to 2,048 characters. Repeated requests to the same URL skip parsing and validation. The cached strings, including any credentials in them, stay in memory until they are evicted. (#1256)
  • Give the cookie jar the request URL without userinfo, query or fragment, and with at most 1024 bytes of path. Cookie handling no longer gets slower or uses more memory as the URL gets longer. 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/. (#1342)
  • Treat [fe80::1%25en0] and [fe80::1%en0] as 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. (#1361)
  • Raise TypeError when Timeout is built from an unsupported value, such as an httpx.Timeout. Before, the request failed later, while connecting. (#1348)
  • Name the header in the UnicodeEncodeError raised when a header value cannot be encoded. The message now ends with (header 'auth'). (#1371)
  • Skip copying the client headers on requests that pass no headers=. (#1375)

Fixed

  • Apply uds, local_address, retries and socket_options to the connection to an HTTP proxy, and retries to the connection to a SOCKS proxy. HTTPTransport and AsyncHTTPTransport silently ignored them when proxy was set. SOCKS proxies still do not support uds, local_address and socket_options. (#1172)
  • Stop raising RuntimeError: aclose(): asynchronous generator is already running when the event loop shuts down, or the garbage collector runs, 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(). (#1281)
  • Omit the IPv6 zone from the Host header. A request to http://[fe80::1%en0]/ sent Host: [fe80::1%en0], which servers such as Apache and lighttpd reject. (#1360)
  • Keep the cookie policy when copying Cookies. A policy on the client jar, such as one with blocked_domains, was ignored on requests that passed cookies=. (#1314)
  • Let a second Response.aclose() close the stream after the first call was cancelled or raised. Before, the response was already marked as closed and the stream stayed open. (#1353)
  • Set response.elapsed when a transport returns a response that is already closed, such as a MockTransport handler returning Response(200, json=...). It raised RuntimeError before. (#1376)
Commits
  • cf13c4b Prepare version 2.17.0 (#1377)
  • 4ff322c Forward uds, local_address and retries to proxied connections (#1172)
  • 269ada1 Cache recent URL parse results (#1256)
  • a33bb50 Set elapsed when a transport returns an already closed response (#1376)
  • c8651c8 Skip the empty cancellation shield and the redundant header copy on each requ...
  • 904bfc9 Name the header when its value cannot be encoded (#1371)
  • 8cd09d9 Decode the IPv6 zone delimiter when parsing a URL (#1361)
  • 5cde238 Omit the IPv6 zone from the Host header (#1360)
  • 538b256 Preserve the cookie policy when copying Cookies (#1314)
  • 0022c4b Let a cancelled or failed Response.aclose() be retried (#1353)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [httpx2](https://github.com/pydantic/httpx2) from 2.16.2 to 2.17.0.
- [Release notes](https://github.com/pydantic/httpx2/releases)
- [Changelog](https://github.com/pydantic/httpx2/blob/main/src/httpx2/CHANGELOG.md)
- [Commits](pydantic/httpx2@v2.16.2...v2.17.0)

---
updated-dependencies:
- dependency-name: httpx2
  dependency-version: 2.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Dec 5, 2026
@dependabot
dependabot Bot requested a review from jcook3701 as a code owner December 5, 2026 18:53
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Dec 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants