-
Notifications
You must be signed in to change notification settings - Fork 15
{client,config}: allow passing through additional httpx arguments #105
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
Conversation
I see CI is failing - presumably flake8 & tests |
HI! Thanks for this PR. We'll have @erdirowlands review when is is back from PTO and complete the testing. Is this blocking any issue that makes this more urgent? Thanks! Matt |
We're just trying to get it all working inside a service we've migrated into an air-gapped network, so we'd appreciate it sooner rather than later - but can wait a while if needed. Our workaround is either a fork of the package or just dropping FF usage temporarily. |
@@ -177,7 +177,7 @@ def authenticate(self): | |||
verify = self._config.tls_trusted_cas_file | |||
|
|||
client = Client(base_url=self._config.base_url, verify_ssl=verify, | |||
raise_on_unexpected_status=True) | |||
raise_on_unexpected_status=True, httpx_args=self._config.httpx_args) |
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.
Shorten line length to get CI passing for flake8
raise_on_unexpected_status=True, httpx_args=self._config.httpx_args) | |
raise_on_unexpected_status=True, | |
httpx_args=self._config.httpx_args) |
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've gone ahead and merged this into a feature branch and I will make the change there.
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.
This looks great. I'm going to merge this into a feature branch which will make it easier for me to test + and follow our release process (docs/samples) etc. I'll do any required tidy up as required by our CI there as well.
I will then aim to get the changes released by the end of the day UK time all being well.
* {client,config}: allow passing through additional httpx arguments (#105) * FFM-11935 Fix line length for flake8 / Update docs and add sample. * FFM-11935 Update docstring and flake8 formatting change --------- Co-authored-by: Zane van Iperen <162071496+zane-zeroflucs@users.noreply.github.com>
Hi, just a heads up this feature has been released in 1.7.0 https://github.com/harness/ff-python-server-sdk/releases/tag/1.7.0 |
Does what it says on the tin.
Adds a
httpx_args
dict toConfig
, and awith_httpx_args()
helper, which if specified multiple times will update the set of existing arguments. This is passed to theClient
andAuthenticatedClient
constructors.Use case - using a HTTP proxy, e.g.
httpx_args={'proxy': 'http://my-proxy:8080'}
.