Skip to content

Decide whether to move from httpx to httpx2 #699

Description

@lackas

Not urgent, and not a proposal to act yet. Recording the situation so the decision is not made by accident.

Where we stand. REST goes through httpx, the websocket through aiohttp. Of httpx we use five symbols: AsyncClient, codes, HTTPStatusError, post and RequestError. The code side of a move would be small.

Why it comes up. httpx has not released since 0.28.1 on 2024-12-06, and its last commit on master is from 2026-02-23. It is still published as "Development Status :: 4 - Beta" and never reached 1.0. The repository is not archived.

What exists instead. httpx2 under pydantic/httpx2, created 2026-05-11, releases up to v2.12.0 in August 2026, active. Its README states that Pydantic is picking up stewardship "with HTTPX itself seeing limited activity recently", aiming to keep the original design. The work is done by former httpx maintainers plus Pydantic staff; the original author is not involved. The package metadata still carries the old author email, which is a fork artefact.

Why not now. The project is three months old and its API is still moving, for example Timeout and Limits were converted to dataclasses on 2026-08-27. There is no httpx-to-httpx2 migration guide yet.

The deciding factor. Home Assistant is by far the largest consumer of this library, and it pins httpx==0.28.1 as a base requirement. Switching now would add a second HTTP library to that dependency tree rather than replace one. So the plan is to follow Home Assistant: when core moves to httpx2, we move with it. A security issue in httpx with no fix would also force the question earlier.

Input welcome, especially from anyone using this library outside Home Assistant.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions