[HTTPXodus] Consider migrating from `httpx` to `httpx2` (the actively maintained fork)
@hassiebp ya está trabajando en esto.
Desde el 4/9/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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. 🙏
- Lenguaje dominante
- Python
- Estrellas
- 468
- Forks
- 349
- Merge medio
- 15 h 51 min
- PR fusionados (30 d)
- 24
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de langfuse/langfuse-python
-
bug compliance feat-data-masking sdk-python security
langfuse/langfuse-python#1896 · 1 asignado ·
-
feat-scores sdk-python unconfirmed-bug
langfuse/langfuse-python#1890 · 1 asignado ·
-
bug feat-evals sdk-python
langfuse/langfuse-python#1861 · 2 comentarios · 1 asignado ·
-
improvement sdk-python
langfuse/langfuse-python#1856 · 1 asignado ·
-
billing bug feat-billing feat-llm-cost-tracking integration-openai sdk-python
langfuse/langfuse-python#1834 · 1 comentario · 1 asignado ·
Todos los issues de langfuse/langfuse-python
Issues similares
-
bug priority:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
NousResearch/hermes-agent#122386 · 1 comentario ·
-
ai-generated
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vllm-project/production-stack#1105 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100