refactor: Drop the httpx2 import alias and correct HTTPX2 naming - #1052
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
September 7, 2026 12:26
Pijukatel
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_httpx2.pypulled the library in asimport httpx2 as httpx, so the module and its tests readhttpx.*throughout while the installed package ishttpx2. Dropping the alias lets the code namethe library it actually uses.
The rename follows through: the private transport attributes become
_httpx2_clientand_httpx2_async_client, matching the sibling adapter's_impit_client/_impit_async_client, and21 test functions plus the
UNSET_HTTPX2_TIMEOUTconstant lose the old spelling. All of it isprivate, so no public name moves. A search for the original
httpxundersrc/andtests/nowturns 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, andthe 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 topython-httpx.org, matching what the 2.5 docs already say. These changes land in
docs/only, sothey reach the docs site at
/nextuntil 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