-
Notifications
You must be signed in to change notification settings - Fork 957
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
Extended conan.conf syntax to permit host-specific proxies #4923
Conversation
Just noticed I'd left 'import sys' in used for debugging - it can be removed. |
This PR looks useful and nice that it seems backwards compatible, thanks for contributing it. It also seems that it would be necessary to bump the minimum requirement of @lasote do you recall some reason why we were requesting 2.7.0? Could it be upgraded? |
I cannot recall, probably we are good upgrading requests. |
conf = """ | ||
[proxies] | ||
https=http://conan.url | ||
only.for.this.conan.url = http://special.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we would need a test with more than 1 host line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added as requested
Hi! Thanks for the contribution One suggestion to consider: IMO, it is easier to understand (and to parse) a plain list of
I assume that |
I'm away from my Dev rig at present, but fwiw, I did run a manual integration test - ran: conan search Poco* -r conan-center
(can't find proxy)
(can't find proxy)
(Success) Not totally conclusive, but it suggests I'll improve the test as suggested this (UK) evening |
This doesn't work as ConfigParser treats the : in the URL as a name/Val separator, by default. That's configurable, but not in a way that retains 100% backward compatibility
Yes, I kinda assumed that also. The docs aren't clear. I can investigate. |
Note: the proxy search code does indeed search for host-constrained proxies before general proxies From 2.8.1 Looks like my install had pulled in 2.21.0 which also worked. |
btw, proxies are documented here in the reference: https://docs.conan.io/en/latest/reference/config_files/conan.conf.html#proxies |
Aha, thanks. I'll update and submit a docs pull request |
Pull request for docs here |
Hi @dawidcha I have proposed in dawidcha#1 some minor improvements, but also bumping the min version of requests to 2.8.1, I think this PR should do it. Thanks again for your contribution, great job! |
@dawidcha Could you take a look to the @memsharded PR? Thanks! |
ping @dawidcha |
pong @dawidcha |
Didn't want to have this waiting for so long, as it was good. Will be in Conan 1.16, thanks @dawidcha for the contribution! |
Changelog: (Feature): Extend syntax to permit host-specific proxies (backward compatible)
Docs: conan-io/docs#1241