This recreates a bug in Poetry where it fails to authenticate with a proxy that requires authentication.
Requires Docker since there's a bit of setup involved.
- Run
docker run -it --rm $(docker build -q .)
- Inside the container, run
./script.sh
- There will be a 407 error
While still in the container, try curl https://example.com
, it works.
The script runs mitmproxy
which is configured to require authentication. Poetry is configured to use the proxy via environment variables in the Dockerfile.
The problem correlates with the git source in pyproject.toml
. Remove it and the problem is gone.
Note This is somewhat mitigated by python-poetry/poetry#6131. Most people will pin to a revision or tag and not see this issue after Poetry's next release.