Migrate HTTP client from httpx to httpx2 #15

Manually merged
marvin8 merged 2 commits from feat/issue-10-httpx2-migration into main 2026-09-11 20:28:17 +00:00
Collaborator

Swaps the HTTP client dependency from httpx~=0.28.1 to httpx2~=2.12.0 (pydantic fork) per project convention, and migrates all imports:

  • src/yunjin/services/fetcher.pyhttpx2.get()
  • src/yunjin/services/media_extractor.pyhttpx2.get()/httpx2.head(), exception types
  • src/yunjin/services/llm_aggregator.pyhttpx2.post(), exception types (in scope per issue goal: all HTTP client usage; file postdates the issue body)
  • Test patch targets updated in test_fetcher.py/test_aggregator.py
  • Roadmap.md dependency summary updated

API compatibility verified against the installed httpx2 2.12.0 source: get/post/head signatures, TimeoutException/RequestError/HTTPStatusError, and Response attributes are identical to the httpx call sites. Only yunjin depended on httpx in uv.lock, so it drops out cleanly.

Closes #10

Swaps the HTTP client dependency from `httpx~=0.28.1` to `httpx2~=2.12.0` (pydantic fork) per project convention, and migrates all imports: - `src/yunjin/services/fetcher.py` — `httpx2.get()` - `src/yunjin/services/media_extractor.py` — `httpx2.get()`/`httpx2.head()`, exception types - `src/yunjin/services/llm_aggregator.py` — `httpx2.post()`, exception types (in scope per issue goal: all HTTP client usage; file postdates the issue body) - Test patch targets updated in `test_fetcher.py`/`test_aggregator.py` - `Roadmap.md` dependency summary updated API compatibility verified against the installed httpx2 2.12.0 source: `get`/`post`/`head` signatures, `TimeoutException`/`RequestError`/`HTTPStatusError`, and `Response` attributes are identical to the httpx call sites. Only yunjin depended on httpx in `uv.lock`, so it drops out cleanly. Closes #10
📝 Update dependency summary in Roadmap.md
All checks were successful
/ pr-review (pull_request) Successful in 10s
/ gitleaks (pull_request) Successful in 29s
/ checks (pull_request) Successful in 3m57s
c07eef8fbb

This PR is too large to review automatically (2485 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2485 lines; limit is 2000). Please consider splitting it into smaller PRs.
marvin8 approved these changes 2026-09-11 20:27:12 +00:00
marvin8 manually merged commit 7201df4548 into main 2026-09-11 20:28:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/yunjin!15
No description provided.