Skip to content

[Tech Debt] Migrate FastAPI TestClient to httpx2 (Starlette deprecation in CI) #118

Description

@MarcoPorcellato

Problem Description

Full pytest run emits:

StarletteDeprecationWarning: Using httpx with starlette.testclient is deprecated; install httpx2 instead.

Source: fastapi/testclient.py via Sovereign UI server tests (tests/test_ui_server.py).

Proposed Architectural Solution

Add httpx2 dev dependency or upgrade FastAPI/Starlette to a combination that eliminates the warning. Target: uv run pytest tests/test_ui_server.py -q -W error::DeprecationWarning passes in CI.

Estimated Impact

Basso — CI signal hygiene; no runtime behavior change.

Files Involved

  • pyproject.toml / uv.lock
  • tests/test_ui_server.py (if import path changes)

Audit metadata

  • Source: Dev audit 2026-06-23
  • Milestone: v1.9.12 — Code Perfection & Tech Debt

Closes when merged with tests green (make check) and CHANGELOG updated per 06-auto-changelog.mdc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper / operator experiencegood first issueGood for newcomershelp wantedExtra attention is neededtech-debtRefactoring and maintainability

    Projects

    Status
    ✅ Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions