Integrate httpcore2 documentation into the httpx2 docs site#997
Conversation
Move the httpcore2 docs into the main mkdocs build under an httpcore2 nav section, rewriting httpcore references to httpcore2 and repointing encode URLs at pydantic/httpx2. Drop the standalone httpcore2 mkdocs config, which was unbuilt and still pointed at the old upstream.
|
Docs preview: https://7a7ab2d0-httpx2-docs.pydantic.workers.dev |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17a4ebef15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pool = httpcore.ConnectionPool(proxy=proxy) | ||
| proxy = httpcore2.Proxy("http://127.0.0.1:8080/") | ||
| pool = httpcore2.ConnectionPool(proxy=proxy) | ||
| r = proxy.request("GET", "https://www.example.com/") |
There was a problem hiding this comment.
Send proxied requests through the pool
In this first proxy example, copying the documented code will fail because httpcore2.Proxy is configuration for ConnectionPool and does not implement .request(). The pool created on the previous line is the object that should send the request, so this should call pool.request(...) or users following the new docs hit an AttributeError before making any proxied request.
Useful? React with 👍 / 👎.
The
httpcore2docs lived in a standalonesrc/httpcore2/mkdocs.ymlthat was never wired into the build and still pointed at the oldencode/httpcoreupstream. This merges them into the main docs site so they ship athttpx2.pydantic.devalongside the httpx2 docs.src/httpcore2/docs/*.mdtodocs/httpcore2/, rewritinghttpcore->httpcore2(prose,import,pip install, mkdocstrings:::directives) and repointing badge/PyPI/GitHub URLs atpydantic/httpx2.httpcore2section to the rootmkdocs.ymlnav.src/httpcore2/mkdocs.ymland the now-emptysrc/httpcore2/docs/.Verified with
zensical build- all httpcore2 pages render and the::: httpcore2.XAPI references resolve. The remaining build warnings are pre-existing and unrelated to httpcore2.AI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.