Migrate HTTP client from httpx to httpx2 #10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The project convention (AGENTS.md) is to use httpx2 (pydantic's fork of httpx) for HTTP, never requests — but the codebase still depends on and imports
httpx.Affected files:
src/yunjin/services/fetcher.py,src/yunjin/services/media_extractor.py,tests/test_fetcher.py, plus thehttpx~=0.28.1dependency inpyproject.toml.Goal
Migrate all HTTP client usage to httpx2 and swap the dependency. API compatibility should be verified against the httpx2 docs during implementation rather than assumed.
Plan of attack
httpx.get/AsyncClientcall sites).pyproject.toml(~=pin), update the three affected files, regenerateuv.lock.Findings (updated scope)
The issue body predates
llm_aggregator.py—src/yunjin/services/llm_aggregator.pyandtests/test_aggregator.pyalso use httpx and are included (per the goal: migrate all HTTP client usage).Roadmap.mddependency summary will be updated too.API compatibility verified against the installed httpx2 2.12.0 source (venv):
httpx2get/post/headsignatures acceptheaders,json,timeout,follow_redirects— identical to our call sitesTimeoutException,RequestError,HTTPStatusError,Response.raise_for_status()/.content/.text/.status_codeall presentalias_httpx()exists but is for apps whose dependencies still import httpx — not needed hereuv.lock, so it drops out cleanlyExecution
feat/issue-10-httpx2-migrationfetcher.py,media_extractor.py,llm_aggregator.py; update patch targets intest_fetcher.py,test_aggregator.py;httpx~=0.28.1→httpx2~=2.12.0;uv sync -U --all-groups; regeneratepylock.tomlsame commituv run nox→ push → PR → ci-watchResolved by PR #15 (merged as
7201df4): the finalRoadmap.mdline went in viac07eef8; no leftover httpx references outside historical.superpowers/specs/docs.