Replace httpx with httpx2 #101
No reviewers
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Reference
marvin8/feed2fedi!101
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-100-httpx-to-httpx2"
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?
Swap the unmaintained
httpxdependency for the actively maintainedhttpx2(Pydantic team). httpx2 is already a transitive dependency via longwei and bump-my-version — this removes the duplicate HTTP stack."httpx[http2]~=0.28.1"with"httpx2[http2]~=2.9.1"from httpx import ...tofrom httpx2 import ..._QUIET_LOGGERS(drop httpx, httpcore → httpcore2)No behavioral changes — httpx2's API is a drop-in replacement for the subset feed2fedi uses. All 178 tests pass on Python 3.12–3.14.
Closes #100
WuMing
Found 6 issue(s). See inline comments below.
@ -8,3 +8,3 @@from cyclopts import Appfrom cyclopts import Parameterfrom httpx import AsyncClientfrom httpx2 import AsyncClientcode [CRITICAL]
Importing from 'httpx2' which is not a known public package. This will cause an ImportError at runtime. If the intended package is 'httpx', revert the change. If 'httpx2' is an internal fork, ensure it is installed correctly, but still suspect.
@ -12,3 +12,1 @@from httpx import AsyncClientfrom httpx import HTTPErrorfrom httpx import StreamErrorfrom httpx2 import AsyncClientcode [CRITICAL]
Import from non-existent package 'httpx2' (AsyncClient). Will cause ImportError.
@ -13,2 +12,2 @@from httpx import HTTPErrorfrom httpx import StreamErrorfrom httpx2 import AsyncClientfrom httpx2 import HTTPErrorcode [CRITICAL]
Import from non-existent package 'httpx2' (HTTPError). Will cause ImportError.
@ -14,1 +12,3 @@from httpx import StreamErrorfrom httpx2 import AsyncClientfrom httpx2 import HTTPErrorfrom httpx2 import StreamErrorcode [CRITICAL]
Import from non-existent package 'httpx2' (StreamError). Will cause ImportError.
@ -12,3 +12,3 @@# stdlib loggers that are too chatty at INFO_QUIET_LOGGERS = ["httpx", "httpx2", "httpcore"]_QUIET_LOGGERS = ["httpx2", "httpcore2"]code [CRITICAL]
Logging quiet list references 'httpx2' and 'httpcore2', which are not known standard libraries. If 'httpx2' does not exist, these suppressors are unnecessary and may mask missing imports. Change back to 'httpx' and 'httpcore' if using the real httpx package.
@ -15,3 +15,3 @@import yt_dlp.utilsfrom feedparser import FeedParserDictfrom httpx import AsyncClientfrom httpx2 import AsyncClientcode [CRITICAL]
Import from non-existent package 'httpx2' (AsyncClient). Will cause ImportError.
src/feed2fedi/app.pyline 0 ·src/feed2fedi/collect.pyline 0 ·src/feed2fedi/collect.pyline 0 ·src/feed2fedi/collect.pyline 0 ·src/feed2fedi/publish.pyline 0 ·src/feed2fedi/logging_config.pyline 0🔴 Not actioned —
httpx2is a real, actively maintained PyPI package (pypi.org/project/httpx2, by the Pydantic team). It is already a transitive dependency of this project vialongweiandbump-my-version. All 178 tests pass across Python 3.12–3.14. These are false positives from an incomplete package database.