-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --no-proxy Option #13051
base: main
Are you sure you want to change the base?
Add --no-proxy Option #13051
Conversation
Hi everyone - am I missing anything on this PR? Also, I am thinking about logging a message if both |
I'm going to put it on the 25.0 milestone so it doesn't get forgotten, but it will be up to a pip maintainer or release manager to review and decide whether it stays on there. I don't have a lot of experience reviewing this type of PR but it looks simple and your note about existing use of |
@martinezlc99, I just happened to be investigating this behavior today and it was a pleasant surprise to see this was active just yesterday. Thanks for driving this forward! I did want to ask, wouldn't the ideal behavior be for the Unfortunately, there seems to be buggy behavior in requests that means simple passing on a |
@jdlangs I think what this PR has going for it is its simplicity. Generally pip should rely on sourcing behavior from the standard or vendored libraries. I notice that uv has not implemented There is no standard definition of what |
Yeah, just using environment variables does seem like the most standard and robust method, but if pip provides a proxy argument, I think being able to configure
The simplest PR would actually be only passing a
Point taken, but is there any tool that treats |
Yeah, I think it's an unfortunate naming collision , maybe |
@notatallshaw @jdlangs my initial intent, and my understanding based on the original issue, was to bypass the proxy completely, so the boolean option made sense. But, I agree the I did a quick search to see how other tools handle this situation and found there is not a consensus:
The Chromium Chromium also supports A nice medium may be adding support for Open to thoughts/suggestions. |
But in this implementation you still take the proxy options provided to pip (which I assume can be either CLI or config), so it doesn't bypass the proxy options completely. Which is fine, there is precedence for this in the existing options I don't know how much other CLIs here are that informative as it's not exactly the same behavior. I would prefer to keep it something simple, but preferably a little more accurate, naming is hard, I'd stick to the current name unless something is obviously better. I really don't think pip should be trying to do it's own emulation of big complex tools, e.g. |
Thanks @notatallshaw - agree with all your points...forgot this implementation will take the proxy from the CLI as well 😎 So I think the name of the option is the only outstanding item. I like your suggestion of |
Hello everyone! When using pip and *.companydomain.com is in no_proxy env var - pip doesn't respect it upon trying to access host-i-need.companydomain.com and still runs it via proxy. Maybe there are some PRs on this topic or should I submit one myself? |
This is unrelated, pip is using requests to make HTTP calls, which in turn largely relies on the standard library implementation of |
Fixes #5378.
This PR was originally done in #12011, which I cancelled due to age and associated pain of rebasing.
Originally this PR stalled in addressing #12011 (comment), but since then I have noticed the
--proxy=PROXY
option also setssession.trust_env = False
as well, so the behavior is consistent.