Skip to content

fix(deps): add httpx2 to dev extras for starlette>=1.10 TestClient - #14

Merged
codesphere-u merged 1 commit into
mainfrom
fix/httpx2-dev-dependency
Nov 24, 2026
Merged

codesphere-u merged 1 commit into
mainfrom
fix/httpx2-dev-dependency

Conversation

@codesphere-u

Copy link
Copy Markdown
Owner

Problem

A fresh install cannot run the test suite: starlette.testclient module requires the httpx2 package. Three modules fail at collection: test_enterprise_readiness, test_policy_assertions_forking, test_production_hardening.

starlette 1.10 moved TestClient onto httpx2; the dev extra still pinned legacy httpx. This is the largest suite in the portfolio (159 test functions), so the blast radius of a broken dev setup is highest here.

Why CI was green

The committed uv.lock pins an older Starlette, so uv sync never exercised the broken declaration.

Change

  • declare httpx2>=0.1.0 in the dev extra
  • regenerate uv.lock

Verification

rm -rf .venv && uv lock && uv sync --extra dev && pytest -q → full suite passed (previously a collection error).

Starlette 1.10 moved TestClient onto httpx2. Every repository pinned the
legacy httpx client, so a fresh install resolved a broken test setup:

    RuntimeError: The starlette.testclient module requires the httpx2
    package to be installed.

CI stayed green only because the committed uv.lock pinned an older
Starlette, which masked the broken declaration for new contributors.
Regenerate the lock and declare httpx2 explicitly.

Verified: rm -rf .venv && uv lock && uv sync --extra dev && pytest -q -> green.
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agentflight Ready Ready Preview Nov 24, 2026 8:45am UTC

@codesphere-u
codesphere-u merged commit 96e147f into main Nov 24, 2026
7 checks passed
@codesphere-u
codesphere-u deleted the fix/httpx2-dev-dependency branch November 24, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant