Skip to content

chore(deps): update python dependencies (minor) - #7937

Merged
dan-petty merged 2 commits into
mainfrom
renovate/python-dependencies
Dec 1, 2026
Merged

dan-petty merged 2 commits into
mainfrom
renovate/python-dependencies

Conversation

@dan-petty-renovate

@dan-petty-renovate dan-petty-renovate Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
anthropic ==2.14.0 → ==2.15.0 age confidence
httpcore2 (changelog) ==2.16.2 → ==2.17.0 age confidence
httpx2 (changelog) ==2.16.2 → ==2.17.0 age confidence
openai ==3.60.0 → ==3.61.0 age confidence

Release Notes

anthropics/anthropic-sdk-python (anthropic)

v2.15.0

Compare Source

Features
  • api: add api_key_requester_unconfirmed error code to the Admin API
  • api: add error codes for cost report size limits
  • api: add the user_profile_cleared error code to workspace updates
Bug Fixes
  • client: tighten argument checks in structured output helpers

  • credentials: refresh after a 401 even if a hook changes the Authorization header

    A 401 now also drops the cached token when max_retries=0, so the next call refreshes it.

  • credentials: stop processes sharing one login from refreshing each other's tokens in a loop

Chores
  • api: remove retired Claude Sonnet 4.5 models
  • docs: clarify which speed needs the fast mode beta header
  • docs: explain the compliance review policy category values
pydantic/httpx2 (httpcore2)

v2.17.0

Compare Source

⚡ 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:[email protected]/ 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

openai/openai-python (openai)

v3.61.0

Compare Source

Features
Bug Fixes
  • honor module base URL changes for WebSocket connections (#​4319) (3146a6d)
  • recheck browser cancellation after approval callbacks (#​4322) (0633d4f)
Performance Improvements
Chores

Configuration

📅 Schedule: (in timezone UTC)

  • Branch creation
    • Only on Monday (* * * * 1)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

@dan-petty-renovate dan-petty-renovate Bot added scope/deps Dependency pins, upgrades and the supply chain type/chore Type chore: maintenance, such as a dependency update labels Nov 30, 2026
@dan-petty-renovate
dan-petty-renovate Bot force-pushed the renovate/python-dependencies branch from 7632abf to af0ea6c Compare November 30, 2026 22:20
@dan-petty
dan-petty enabled auto-merge (squash) December 1, 2026 01:42
@dan-petty-renovate

Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

dan-petty-renovate Bot and others added 2 commits December 1, 2026 12:34
httpx2 2.17.0 writes the "%" before an IPv6 zone as "%25" in a URL
(RFC 6874, pydantic/httpx2#1361). URL.host returns the zone with a plain
"%". The test expected the old form.

The new form is correct for devops-cli. kubectl refuses the old form in
--server with "invalid URL escape". The code that opens a socket reads
URL.host, which has the plain "%".
@dan-petty
dan-petty force-pushed the renovate/python-dependencies branch from 3982342 to dd0d44a Compare December 1, 2026 12:42
@dan-petty

Copy link
Copy Markdown
Owner

Fix of the conflict and of the failed test (head dd0d44a53)

Cause. httpx2 2.17.0 writes the % before an IPv6 zone as %25 in a URL (pydantic/httpx2#1361). URL.host returns the zone with a plain %. One test expected the old form. The conflict came from the OpenTelemetry updates on main.

The new form is correct for the product code. No change to src/ is necessary.

  • kubectl --server='https://[fe80::1%lo]:6443' fails with invalid URL escape "%lo". The %25lo form gets to the login prompt. devops cloudflare tunnel writes this URL.
  • git sends a decoded zone to a credential helper. The decoded URL.host now matches it.
  • Each socket dial reads URL.host, which has the plain %.
  • I compared the collector endpoint, the scrape URL and the probe target with 2.16.2 and 2.17.0. No input dials a worse host with 2.17.0.

Branch. I did not use the rebase checkbox of Renovate. The branch needs a hand-written commit, and a Renovate rebase discards such commits. I rebased the Renovate commit on main and resolved pyproject.toml. uv lock then changed only the 4 packages of this pull request. The merge commit of main had no manual change, so the rebase lost nothing.

Check Result
devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures pass
devops ci test tests/sandbox/test_k8s_ipv6_and_proxy_boundaries.py 21 passed
pytest -n 4 tests/http tests/sandbox tests/ai/client tests/telemetry 1798 passed, 1 skipped

Found, not changed (the same with 2.16.2). cluster_host() in k8s/node_port.py and a probe target without a scheme read a URL with urllib, which keeps %25. The dial then uses the zone 25eth0. This needs a link-local zone address in a kubeconfig or a target.

Note. Auto-merge is on. This pull request merges when the required checks pass.

@dan-petty
dan-petty merged commit 14787be into main Dec 1, 2026
37 checks passed
@dan-petty
dan-petty deleted the renovate/python-dependencies branch December 1, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/deps Dependency pins, upgrades and the supply chain type/chore Type chore: maintenance, such as a dependency update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant