-
Notifications
You must be signed in to change notification settings - Fork 290
[HTTPXodus] migrate httpx to httpx2 (hard switch; closes #1403) #1404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ProgrammerPlus1998
wants to merge
2
commits into
qdrant:master
Choose a base branch
from
ProgrammerPlus1998:httpxodus/httpx2-migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π― Functional Correctness | π Major | ποΈ Heavy lift
π Supported by static analysis
π€ get_repo_knowledge executed:
get_repo_knowledge qdrant/qdrant-client /tmp/coderabbit-repo-knowledge/qdrant-qdrant-client-6240b70eLength of output: 600
π Script executed:
Repository: qdrant/qdrant-client
Length of output: 13078
π Script executed:
Repository: qdrant/qdrant-client
Length of output: 12935
π Script executed:
Repository: qdrant/qdrant-client
Length of output: 13939
π Web query:
PyPI httpx2 2.12.0 package httpx2 import compatibilityπ‘ Result:
The httpx2 package is a fork of the original httpx library, maintained by Pydantic [1]. As of version 2.12.0, the package requires Python 3.10 or newer [2]. Regarding import compatibility, httpx2 is intended to replace httpx [3][2]. To use it, you must update your code to import the package as follows: import httpx2 # Example usage r = httpx2.get('https://www.example.org/') [4] Because httpx2 is a fork with a different package name, simply replacing the package in your environment and changing the import statement in your code is the primary migration path [3][2]. If you have existing dependencies that still rely on the original httpx package and you cannot update them, the library provides an optional utility, httpx2.alias_httpx, which can be called at the application level to make import httpx statements resolve to httpx2 process-wide [5]. This utility is designed for applications only, not for libraries [5]. Additionally, if you are migrating from the original httpx, note that internal components have also been renamed (e.g., httpcore is now httpcore2) and you should update any logging configurations or User-Agent string matching that previously referenced the original names [3][2].
Citations:
π Script executed:
Repository: qdrant/qdrant-client
Length of output: 9403
Complete the
httpx/httpx2compatibility migration.qdrant_client/__init__.pyeagerly importsQdrantClientandAsyncQdrantClient. Their import chain reaches modules that still importhttpx, whilepyproject.tomldeclares onlyhttpx2. A clean installation can therefore fail withModuleNotFoundError: No module named 'httpx'.Retain
httpxas a runtime dependency and use a shared compatibility import, or migrate every runtimehttpximport tohttpx2. Do not rely on the application-levelhttpx2.alias_httpxutility.π Affects 2 files
qdrant_client/http/api_client.py#L6-L6(this comment)pyproject.toml#L21-L21π€ Prompt for AI Agents