Skip to content

Guard httpx 1.x imports and pin the httpx extra - #38

Merged
proxymesh merged 3 commits into
mainfrom
cursor/httpx-1-guard-bff1
Nov 12, 2026
Merged

proxymesh merged 3 commits into
mainfrom
cursor/httpx-1-guard-bff1

Conversation

@proxymeshai

@proxymeshai proxymeshai commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Importing python_proxy_headers.httpx_proxy on httpx >= 1 raises ImportError. The message names the installed version and pip install 'python-proxy-headers[httpx]'. The [httpx] extra is httpx>=0.28,<1.

python_proxy_headers/__init__.py does not import the adapter.

Split out of #34. Contract tests, the other extras, and the CI matrix are #39.

Open in Web Open in Cursor 

Cursor and others added 2 commits November 12, 2026 21:44
Importing the adapter on httpx >= 1 warns instead of crashing, and the
public helpers raise UnsupportedHttpxVersion. The [httpx] extra is
httpx>=0.28,<1. The 0.28 adapter is unchanged.

Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
The adapter cannot run without httpcore, so import raises ImportError
instead of warning and stubbing the helpers.

Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
@proxymesh
proxymesh merged commit 0d5e647 into main Nov 12, 2026
3 checks passed
@proxymesh
proxymesh deleted the cursor/httpx-1-guard-bff1 branch November 12, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants