File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,6 +222,27 @@ jobs:
222222
223223 cd .. && rm -rf pypi-proxy-test
224224
225+ - name : Test PyPI - httpx NO_PROXY Regression (#339)
226+ run : |
227+ echo "Testing that proxy-mode NO_PROXY does not crash Python httpx (#339)..."
228+ HTTPX_TESTDIR=$(mktemp -d) && cd "$HTTPX_TESTDIR"
229+ pmg uv init --no-readme
230+ pmg uv add httpx==0.28.1
231+
232+ # Run under proxy mode (default). PMG injects NO_PROXY into the child env;
233+ # the bracketed [::1] it used to inject made urllib/httpx raise
234+ # "InvalidURL: Invalid port: ':1]'" when constructing a client.
235+ pmg uv run python -c '
236+ import os, httpx
237+ np = os.environ.get("NO_PROXY") or os.environ.get("no_proxy") or ""
238+ assert "::1" in np, "proxy-mode NO_PROXY not set, test is not exercising the fix: %r" % np
239+ assert "[::1]" not in np, "NO_PROXY still contains bracketed loopback: %r" % np
240+ httpx.Client().close()
241+ print("httpx ok; NO_PROXY=" + np)
242+ '
243+
244+ cd - && rm -rf "$HTTPX_TESTDIR"
245+
225246 - name : Test PNPM - Single Package & Manifest
226247 run : |
227248 echo "Testing PNPM single package installation..."
You can’t perform that action at this time.
0 commit comments