[HTTPXodus] Consider migrating from `httpx` to `httpx2` (the actively maintained fork)
Maintainer thường phản hồi trong vòng 1 ngày
@hassiebp đang làm issue này rồi.
Từ ngày 4/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Closes #0
🏷️ 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 PR per project — no drive-by changes.
What is httpx2
httpx2 is a fork of httpx 0.28.1 maintained by Pydantic Services Inc., with the original httpx author Tom Christie involved. It is actively released (v2.0.0 → v2.12.0 since May 2026) and keeps a compatible public API:
import httpx2 as httpx # or just `import httpx2` — the API is identical
r = httpx2.get("https://example.org")
Why migrate — the benefits
- Active maintenance — regular releases, reviewed PRs, funded maintainer team; vs
httpx's 21-month stable-line stall. - Modern TLS by default — certificates verified against the OS trust store instead of bundled
certifi. - New capabilities — built-in Server-Sent Events (
client.sse()), WebSocket support (httpx2[ws]). - Ecosystem alignment — Starlette, FastAPI, OpenAI Python SDK, Anthropic Python SDK, MCP Python SDK have all migrated or dual-supported
httpx2.
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.
- Dependency conflicts: packages that pin
httpx<1.0already conflict with migrated peers; the longer the wait, the worse the resolver pain. - Compounding migration cost: the gap between 0.28.x and whatever
httpx1.0 becomes keeps growing; migrating tohttpx2now is a small, well-documented step (official migration guide: https://pydantic.dev/docs/httpx2/get-started/migration/).
What migration could look like here
langfuse already requires python>=3.10,<4.0, which is exactly the floor for httpx2. The only direct httpx constraint in pyproject.toml is "httpx>=0.15.4,<1.0", which has no <1.0 upper-bound conflict in the dependency tree today (no resolved version of httpx2 would satisfy it) but should be relaxed as part of the migration.
A dual-import path works cleanly here because the public API surface used in langfuse/ is exactly the surface httpx2 mirrors:
httpx.Client(...)/httpx.AsyncClient(...)— constructor signatures matchhttpx.Response/httpx.Request— used for fixture construction in testshttpx.HTTPStatusError/httpx.Timeout/httpx.Limits— all compatible- No internal cross-module state or
httpx-module-identity assertions
A draft branch with the dual-import change (12 files, +45 / −11) is ready at ProgrammerPlus1998/langfuse-python on httpxodus/httpx2-migration. Happy to open a PR if the maintainers are interested; equally happy to close this if you'd rather wait for httpx 1.0 stable. 🙏
- Ngôn ngữ chính
- Python
- Star
- 498
- Fork
- 361
- Merge trung bình
- 16 giờ 40 phút
- Pull request đã merge (30 ngày)
- 38
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của langfuse/langfuse-python
-
tests/unit/test_prompt.py fails on a fresh clone without LANGFUSE_* env varsCó thể đã có người làm @Mathoholic đã nhận hôm nay. Đang mởbug feat-prompt-management sdk-python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
langfuse/langfuse-python#1976 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(langchain): failed streaming LLM runs retain IDs in callback memoCó thể đã có người làm @hassiebp đã nhận hôm nay. Đang mởbug integration-langchain sdk-python
langfuse/langfuse-python#1977 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: ChatPromptClient.compile appends str(whole list) once per non-dict placeholder itemCó thể đã có người làm @hassiebp đã nhận 2 ngày trước. Đang mởbug feat-prompt-management sdk-python
langfuse/langfuse-python#1971 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: LANGFUSE_MAX_EVENT_SIZE_BYTES is parsed but never enforced for score eventsCó thể đã có người làm @hassiebp đã nhận 2 ngày trước. Đang mởbug feat-scores sdk-python
langfuse/langfuse-python#1966 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: non-numeric status in a 207 error entry raises inside handle_exception, kills the score consumer thread, flush()/shutdown() then hangCó thể đã có người làm @hassiebp đã nhận 2 ngày trước. Đang mở[Integrations] Language Clients bug feat-scores sdk-python
langfuse/langfuse-python#1967 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của langfuse/langfuse-python
Issue tương tự
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bug-hunt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày