[HTTPXodus] Consider migrating from `httpx` to `httpx2` (the actively maintained fork)
Author: ProgrammerPlus1998Created Sep 4, 2026Updated Sep 4, 2026
[HTTPXodus] Consider migrating from httpx to httpx2 (the actively maintained fork)
️ This issue is part of HTTPXodus — a community effort to help major Python projects plan their path off the stalled
httpxstable line ontohttpx2, the actively maintained fork by Pydantic Services. One coordinated issue per project — no spam, no drive-by PRs.
Background — what happened to httpx
- The last stable release is 0.28.1 (2024-12) — 21+ months ago.
1.0.dev4–dev6shipped Aug 2026; no committed date for stable 1.0.httpx2(fork by Pydantic Services, Tom Christie involved) has been releasing weekly since 2026-05, currently at 2.12.0. Public API is compatible (Client,AsyncClient,Limits,Response,HTTPError).
Meanwhile, the ecosystem has adopted httpx2: Starlette, FastAPI, OpenAI SDK, Anthropic SDK, MCP Python SDK, and AutoGPT, mem0, FastChat, reflex, chroma, flet, python-telegram-bot, instructor (HTTPXodus campaign, all in flight).
Usage in promptflow
src/promptflow-core/.../_http_connection_provider.pysrc/promptflow-azure/.../_asset_client.pysrc/promptflow-azure/.../_run_history_client.pysrc/promptflow-azure/.../_artifact_client.pysrc/promptflow-azure/.../_metrics_client.pysrc/promptflow-azure/.../_async_run_downloader.pysrc/promptflow-devkit/.../_base_executor_proxy.pyhttpx = ">=0.25.1"insrc/promptflow-devkit/pyproject.toml(devkit owns the dep; other sub-packages inherit via the workspace)
All call sites are async HTTP and treat httpx as a transport implementation detail — no httpx.Response is re-exported in a public signature.
Migration options
- Option A — dual import (recommended for libraries / framework SDKs):
try: import httpx2 as httpx; except ImportError: import httpx.python_version >= "3.10"marker on the new dep keeps 3.9 working. - Option B — hard switch: drop
httpxentirely. Cleaner, but drops 3.9.
Notes
- ⚠️ TLS behaviour change:
httpx2verifies against the OS trust store instead of certifi. Worth a changelog line for Azure Stack / private CA users. - No existing httpx2 PR or issue in this repo (verified 2026-09-04).
- Happy to revise / close per maintainer direction.
Source: microsoft/promptflow