[HTTPXodus] Consider migrating from `httpx` to `httpx2` (the actively maintained fork)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #12596 @SiAgentBuild による — マージされずにクローズ
評価
この issue はまだ評価されていません。
説明
repo: deepset-ai/haystack
star_count: 26400
recon_date: 2026-09-04
status: draft-ready
Title: [HTTPXodus] Consider migrating from httpx to httpx2 (the actively maintained fork)
Body:

🏷️ This issue is part of HTTPXodus, a community effort to help major projects plan their path off the stalled
httpxstable line ontohttpx2, the actively maintained fork by Pydantic Services (with original httpx author Tom Christie involved). One coordinated issue per project — no spam, no drive-by PRs.
Background — what happened to httpx
httpx is one of the most important HTTP clients in the Python ecosystem (370k+ dependent repositories). However:
- The last stable release is 0.28.1 (December 2024) — over 20 months ago.
- For most of 2025 the repository was dormant; maintenance trackers (e.g. Snyk) now flag it as inactive.
- Encouragingly, the project has recently resumed activity:
1.0.dev4–dev6shipped between 2026-08-19 and 2026-08-31. A 1.0 is clearly in the works, but there is no committed date for a stable 1.0, and the dev line carries breaking changes.
Meanwhile, the ecosystem has already begun moving. Projects that have adopted httpx2:
| Project | Stars | Status |
|---|---|---|
| Starlette | 12.5k+ | ✅ Migrated |
| FastAPI | 102k+ | ✅ Dual support (httpx2 test dependency) |
| OpenAI Python SDK | 31.5k+ | ✅ Migrated |
| Anthropic Python SDK | 3.9k+ | ✅ Migrated in v1.0 |
| MCP Python SDK | 24k+ | ✅ Migrated in v2.0 |
What is httpx2
httpx2 is a fork of httpx 0.28.1 maintained by Pydantic Services Inc., with Tom Christie involved. It is actively released (v2.0.0 → v2.12.0 since May 2026) and keeps a compatible public API:
import httpx2
r = httpx2.get("https://example.org")
Why migrate — the benefits
- Active maintenance — regular releases, reviewed PRs, and a funded maintainer team, versus an uncertain stable-release timeline.
- Modern TLS by default — certificates are verified against the OS trust store instead of the bundled
certifi, removing a common source of stale-CA issues. - New capabilities — built-in Server-Sent Events (
client.sse()) and WebSocket support (httpx2[ws]), without extra dependencies. - Ecosystem alignment — as frameworks and SDKs migrate, staying on httpx increasingly means duplicate HTTP stacks in one dependency tree.
Risks of staying on httpx
- Security exposure: no stable-line releases means no stable-line security fixes. If a CVE lands in 0.28.x today, there is no maintained branch to patch it.
- Dependency conflicts: packages that pin
httpx<1.0already conflict with migrated peers; the longer the wait, the worse the resolver pain for downstream users. - Compounding migration cost: the gap between 0.28.x and whatever 1.0 becomes keeps growing; migrating to httpx2 now is a small, well-documented step (official migration guide: https://pydantic.dev/docs/httpx2/get-started/migration/).
What migration could look like here
Usage (from recon.py / source inspection):
haystack/utils/http_client.py:import httpx; definesinit_http_client()returninghttpx.Client | httpx.AsyncClient | None; also referenceshttpx.Limits; exposesClient/AsyncClienttypes in overload signatures.pyproject.toml:"httpx"in core dependencies;"httpx[http2]"in test env (needed by link-content-fetcher tests).- Only one source file directly imports
httpx; downstream consumers mostly receive clients viainit_http_client.
Two viable paths, depending on your compatibility goals:
-
Option A — dual support (recommended for libraries): prefer httpx2 when available, fall back to httpx:
try: import httpx2 as httpx except ModuleNotFoundError: import httpxwith
httpx2; python_version >= "3.10"added as an optional/extra dependency (or alongsidehttpxin core deps for dual-run). -
Option B — hard switch (fine for applications / next major): replace the dependency outright. Requires Python ≥ 3.10 (already
requires-python >= 3.10).
⚠️ One caveat worth calling out: httpx2's move to the OS trust store can change behavior in containers and corporate-proxy environments that relied on certifi. Worth a note in your changelog either way.
Notes:
- Previous related PRs
#12336,#12348,#12332(closed) deal withopenai/numpypinning — not anhttpxmigration; no duplicatehttpx2migration issue exists for this repo. pyproject.tomlpins no upper bound onhttpx; withhttpx1.0 dev active, tightening or dual-importing now avoids future resolver conflicts.- Migration should update
pyproject.toml(corehttpx2optional + keephttpx) andhaystack/utils/http_client.py(dual import), and mirror any test refs that assert onhttpx.Clientinstances. - No PR will be opened by this campaign until maintainers confirm interest; happy to close if you'd rather wait for
httpx1.0 stable.
Happy to open a PR for either option if the maintainers are interested — and equally happy to close this if you'd rather wait for httpx 1.0 stable. No pressure; the goal is just to make sure the decision is an informed one. 🙏
Draft prepared by HTTPXodus campaign (author: xic; no AI co-signature). Issue not yet created on GitHub — awaiting human review per HTTPXodus charter (no drive-by PRs, issue first).
- 主要言語
- Python
- スター
- 27.2k
- フォーク
- 3.5k
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 254
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
deepset-ai/haystack のほかの issue
-
feat: `ByteStream.from_file_path` should keep the file path in `meta`対応中かも @pinjun99 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
deepset-ai/haystack#14081 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
BlockingConfirmationStrategy ignores an empty argument replacement対応中かも @sjrl が 6 日前に担当しました。 オープンP1
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
deepset-ai/haystack#13863 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CSVToDocument row mode fails on CR-separated CSV input対応中かも @julian-risch が 66 日前に担当しました。 オープンP3
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
deepset-ai/haystack#13022 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
CSVToDocument row mode drops a real extra_columns field on ragged rows再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンhandled internally P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepset-ai/haystack#12994 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
CSVDocumentCleaner deletes a row that says N/A, and both CSV components empty those cells対応中かも @michaelkillgta が 72 日前に担当しました。 オープンP3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
deepset-ai/haystack#12784 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
deepset-ai/haystack の issue をすべて見る
似ている issue
-
Test: to_hijri() accepts datetime.datetime and uses only the date part対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンgood first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
omarelshamy25x/shamy-hijri#63 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
polish
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scores対応中かも @AshutoshSingh840 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
UKGovernmentBEIS/control-arena#992 ·
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
mvalentsev/awesome-free-ai-coding#70 ·
メンテナーはふだん 1 日以内に返信