Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Update conan_requester.py #5162
Hi, I have a problem where proxy settings are not being taken from the environment (so I have to manually specify them in conan.config). In searching for the solution to that problem I noticed that this code might not work as intended. When the popped variable is True the right part of the "or" will not be executed ... and thus not all proxy settings would be cleared (only the first encountered is removed).
Just as an example to check my thinking:
Do I understand it right? Thanks.
Changelog: Bugfix: Make sure that proxy "http_proxy", "https_proxy", "no_proxy" vars are correctly removed if custom ones are defined in the conan.conf. Also, avoid using
I have a better understanding of why I have a problem with the Proxy settings. In this code:
self.proxies will be set; first from the conan.conf file; and then second from a call to urllib.request.getproxies() (conans/client/conf/init.py line 431). The problem with that is that getproxies() returns the proxy settings with truncated names, i.e. http_proxy becomes http, and these apparently do not work.
The comment gives a hint of the problem:
Its possible that this worked for a lot of people because the above code was broken and removed only one proxy string from the environment. It was a matter of chance which one it was, in my case the NO_PROXY was taken first ... and calls to local_host would fail (since the call went the the proxy server ... and that did not work at all).
I will make another change to remove the call to