Repository navigation
[HTTPXodus] migrate httpx to httpx2 (hard switch) - #7677
Open
SiAgentBuild wants to merge 3 commits into
Open
SiAgentBuild wants to merge 3 commits into
SiAgentBuild wants to merge 3 commits into
Conversation
Use the actively maintained httpx2 fork (Pydantic Services) when running
on Python 3.10+, falling back to httpx on 3.9. Five call sites in
chromadb/api/{base_http_client,fastapi,async_fastapi,client,async_client}.py
and a new conditional dependency in pyproject.toml.
Refs: chroma-core#7671
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
Convert the httpx usages the previous commit missed: embedding functions (lazy, dynamic, and top-level imports), tests (patch targets, ConnectError import), and requirements.txt. Drop the httpx dependency, remove the python_version marker on httpx2, and bump requires-python to >=3.10 (httpx2 requires 3.10+; Python 3.9 is EOL since 2025-10). Refs: chroma-core#7671
SiAgentBuild
force-pushed
the
httpxodus/httpx2-migration
branch
from
September 9, 2026 08:14
bd50df6 to
8586ca3
Compare
This branch has not been deployed
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.
Closes #7671
What this PR does
Complete hard switch from
httpxtohttpx2:import httpxwithimport httpx2across the package — including the lazy and dynamic imports inchromadb/utils/embedding_functions/(cloudflare, huggingface, jina, together, qwen, splade, onnx-mini-lm, roboflow) and the test suite (patch targets,ConnectErrorimport)httpxfrompyproject.tomlandrequirements.txt;httpx2>=2.12.0is the only runtime HTTP dependencyrequires-pythonto>=3.10(httpx2 requires 3.10+; Python 3.9 is EOL since 2025-10)Diff summary
21 files, +53 / −68 (commit
8586ca3):chromadb/api/(6 files)if TYPE_CHECKING: httpx2 / else: httpxdual-mode blocks → plainimport httpx2; one docstring updatedchromadb/utils/embedding_functions/(8 files)import httpx→import httpx2; roboflow'simportlib.import_module("httpx")→"httpx2"; install-hint messages now saypip install httpx2chromadb/test/(5 files)httpx.stream→httpx2.stream,chromadb.api.fastapi.httpx.Client→...httpx2.Client);from httpx2 import ConnectErrorpyproject.toml,requirements.txthttpx>=0.27.0;httpx2>=2.12.0without version marker;requires-python = ">=3.10"Test results
chromadb/test/api/test_base_http_client.py— the suite that exercises retry/backoff againsthttpx2.Response/httpx2.Request: 5/5 pass in an isolated environment with httpx2 2.12.0 and no httpx installedNotes for reviewer
httpx2verifies TLS against the OS trust store instead of the bundledcertifi. Self-hosted chroma deployments behind corporate proxies or in minimal containers that relied on certifi's CA bundle may needSSL_CERT_FILE/SSL_CERT_DIRafter the switch. Worth a line in the changelog.clients/python/pyproject.tomlstill listshttpx>=0.27.0, but that package has noimport httpxin its code — left untouched to keep this PR scoped; can be dropped in a follow-up.Happy to revise per review — and equally happy to close this PR if the maintainers would rather wait for
httpx1.0 stable. 🙏