Skip to content

Commit 0fc6043

Browse files
committed
Lead the whats-new entry with the httpx2 swap; note logger and UA renames
The whats-new bullet now headlines the dependency swap itself with TLS as one of its consequences, and the migration guide covers the renamed loggers, the new User-Agent, and module-keyed telemetry integrations going quiet. No-Verification-Needed: documentation-only change
1 parent 4351721 commit 0fc6043

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/migration.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,13 @@ at runtime, so an `httpx.AsyncClient` passed as `http_client` degrades in
136136
subtle ways (server-initiated messages stop arriving) instead of raising
137137
immediately.
138138

139+
The client also identifies itself differently: the default User-Agent is now
140+
`python-httpx2/<version>`, and log lines come from the `httpx2` and
141+
`httpcore2.*` loggers, so a `logging.getLogger("httpx")` or
142+
`logging.getLogger("httpcore")` suppression no longer matches anything.
143+
Telemetry integrations keyed to the `httpx` module (such as OpenTelemetry's
144+
httpx instrumentation) stop seeing the SDK's traffic as well.
145+
139146
TLS verification also changes: `httpx` validated certificates against the
140147
bundled `certifi` CA list, while `httpx2` validates against the operating
141148
system trust store via [`truststore`](https://pypi.org/project/truststore/).

docs/whats-new.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ The renames announce themselves. These do not:
138138
* **URI templates are real RFC 6570 now.** `{+path}`, `{?query}` and friends work, matching is exact instead of regex-loose, and path traversal in extracted values is rejected by default. Stricter templates fail at decoration time, not on the first request. **[URI templates](servers/uri-templates.md)**.
139139
* **The streamable HTTP lifespan runs once**, at startup, and its state is shared by every session and request. In v1 it ran once per session, and once per request under `stateless_http=True`. Pools and caches built in a lifespan get dramatically cheaper; anything that acquired a per-connection resource there belongs in the handler body now. **[Lifespan](handlers/lifespan.md)**.
140140
* **`mcp dev` and `mcp install` pin the environment they spawn** to your installed SDK version. Both commands run your server in a fresh `uv run --with ...` environment, which used to resolve `mcp` to the newest stable release rather than the version you are developing against. **[Migration Guide](migration.md#mcp-dev-and-mcp-install-pin-the-spawned-environment-to-your-sdk-version)**.
141-
* **TLS certificates verify against the operating system trust store, not certifi.** The SDK's HTTP client is now `httpx2`, which validates through `truststore` instead of certifi's bundled CA list. Most environments never notice; a minimal container with no system CA store, or a private CA that only certifi's bundle knew about, starts failing the TLS handshake. Set `SSL_CERT_FILE`/`SSL_CERT_DIR` or pass `verify=ssl_context` to your client. **[Migration Guide](migration.md#httpx-and-httpx-sse-replaced-by-httpx2)**.
141+
* **The HTTP client is now `httpx2`, not `httpx`.** The dependency swap changes what your code catches and passes (`httpx2.AsyncClient`, `httpx2.ConnectError`), and it changes how TLS certificates are verified: `httpx2` validates through `truststore` against the operating system trust store instead of certifi's bundled CA list. Most environments never notice; a minimal container with no system CA store, or a private CA that only certifi's bundle knew about, starts failing the TLS handshake. Set `SSL_CERT_FILE`/`SSL_CERT_DIR` or pass `verify=ssl_context` to your client. **[Migration Guide](migration.md#httpx-and-httpx-sse-replaced-by-httpx2)**.
142142

143143
### Removed outright
144144

0 commit comments

Comments
 (0)