Closed sw96411 closed 3 years ago
sounds good!
Hi @sw96411, any updates on this? I can take this up if you would like
Sorry for leaving this hanging.
I have a solution (a subclass of GafferConnector) that works in a particular deployment of Gaffer but it's very opinionated about exactly how the proxy/SSL environment is configured, and therefore not suited to a PR into this project, where we need something that will work much more generically.
I spent an afternoon trying to make my environment-specific code more generic but ended up tying myself in knots, and then life and other requirements intervened.
I'll send you a private e-mail with the code I did end up using - feel free to take that work forward or to reach out for a chat as appropriate,
Excellent, that would be really helpful. Will try and take that forward to something generic that can solve this issue
GafferPy is written using urllib to do it's HTTP connections, which is a venerable old thing.
There's a limitation of urllib that stops it being able to connect to HTTPS services that are behind a proxy. These days, that describes quite a lot of corporate environments and therefore puts an unnecessary limit on who can take advantage of the python API for Gaffer.
Swapping to requests instead of URLLib would be a fairly straightforward way of resolving this issue - I've tried this out locally and it seems fine so I will tidy a few things up and hang a PR off this issue if that's OK? An alternative is to keep urllib and write a custom HTTPSOpener, but requests produces more readable code, with less custom elements to go wrong