pip fork to experiment with PEP-458 implementation https://www.python.org/dev/peps/pep-0458/: See branch tuf-v2 (and tuf-mvp and tuf-mvp-vendored for earlier work)
pip supports (in addition to env variables) the --proxy option. The value is inserted into the requests.Session object as http and https proxy.
If we let pip handle target downloads instead, the issue is solved for those but the metadata files would still be downloaded by TUF: if access to pypi.org requires a proxy, the "--proxy" setting would not work (the environment variable still would work)
I wonder if it's possible to support --proxy in pip by modifying the environment variable before the PipSession (and SecureSession) is created: this way the there would be no need to modify session object and things should just work, whether the pip or tuf is downloading files ...
There seem to be no tests for the proxy functionality in pip. I wonder if this is a sign of low importance? In any case it makes any changes that much more difficult
pip supports (in addition to env variables) the
--proxy
option. The value is inserted into the requests.Session object as http and https proxy.If we let pip handle target downloads instead, the issue is solved for those but the metadata files would still be downloaded by TUF: if access to pypi.org requires a proxy, the "--proxy" setting would not work (the environment variable still would work)
I wonder if it's possible to support
--proxy
in pip by modifying the environment variable before the PipSession (and SecureSession) is created: this way the there would be no need to modify session object and things should just work, whether the pip or tuf is downloading files ...