Skip to content

refactor: Drop the httpx2 import alias and correct HTTPX2 naming - #1052

Merged
vdusek merged 5 commits into
masterfrom
refactor/drop-httpx2-import-alias
Sep 8, 2026
Merged

refactor: Drop the httpx2 import alias and correct HTTPX2 naming#1052
vdusek merged 5 commits into
masterfrom
refactor/drop-httpx2-import-alias

Conversation

@vdusek

@vdusek vdusek commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

_httpx2.py pulled the library in as import httpx2 as httpx, so the module and its tests read
httpx.* throughout while the installed package is httpx2. Dropping the alias lets the code name
the library it actually uses.

The rename follows through: the private transport attributes become _httpx2_client and
_httpx2_async_client, matching the sibling adapter's _impit_client / _impit_async_client, and
21 test functions plus the UNSET_HTTPX2_TIMEOUT constant lose the old spelling. All of it is
private, so no public name moves. A search for the original httpx under src/ and tests/ now
turns up only the two sentences that describe the library's lineage on purpose.

It also cleans up link labels left over from #1048. Eight places wrote
[HTTPX](https://github.com/pydantic/httpx2), giving the current client the old library's name, and
the surrounding prose had the same split: docstrings said HTTPX while the link beside them said
HTTPX2. The library calls itself HTTPX2, so 66 prose references now use that name. The v2 upgrade
guide is the reverse case: it describes moving off the original httpx, so its link goes back to
python-httpx.org, matching what the 2.5 docs already say. These changes land in docs/ only, so
they reach the docs site at /next until the next version snapshot.

No behavior changes. The 241 unit tests covering the HTTP clients, headers, timeouts, and the
pluggable client still pass, 21 of them under new names.

✍️ Drafted by Claude Code

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Sep 7, 2026
@vdusek vdusek self-assigned this Sep 7, 2026
@github-actions github-actions Bot added this to the 149th sprint - Tooling team milestone Sep 7, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Sep 7, 2026
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.24%. Comparing base (3e6f1ea) to head (6143d11).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1052   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files          59       59           
  Lines        5509     5509           
=======================================
  Hits         5247     5247           
  Misses        262      262           
Flag Coverage Δ
integration 92.17% <78.94%> (+0.12%) ⬆️
unit 87.34% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested a review from Pijukatel September 7, 2026 12:26
@vdusek
vdusek marked this pull request as ready for review September 7, 2026 12:26
@vdusek
vdusek requested a review from szaganek as a code owner September 7, 2026 12:26
@vdusek vdusek changed the title refactor: Drop the httpx2 import alias and correct HTTPX2 references refactor: Drop the httpx2 import alias and correct HTTPX2 naming Sep 7, 2026
@vdusek
vdusek merged commit d5d4c6e into master Sep 8, 2026
30 checks passed
@vdusek
vdusek deleted the refactor/drop-httpx2-import-alias branch September 8, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants