-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[python] add socket_options to configuration for the rest client #7795
[python] add socket_options to configuration for the rest client #7795
Conversation
805f60e
to
5e57525
Compare
closing and re-opening to kick off ci again |
@meadsteve this looks great, thank you! |
Thanks. The tests sound good but I wasn't sure where to start so thanks for the suggestion. |
Yup, that CI error is unrelated to your PR; please ignore it. |
…t client This mirrors work done on the python generator
@spacether I've added a test to cover this in python_experimental. I couldn't see any existing structure to do this for the non experimental python. Let me know if there's anything else you'd expect to see before this gets merged. |
…rom configuration
d7b4e2a
to
e5b49c6
Compare
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!
Thank you for the PR and for adding the tests!
This PR adds a property to the configuration object for the generated code rest client called socket_options. This property is passed down into urllibs3's ProxyManager/PoolManager as addition_pool_args. This extra key word argument should be picked up by the underlying HTTPConnection objects.
This enables consumers of the generated client to configuring the underlying connection if needed. In my specific use case I need this to set some keepalive settings for the connections.
PR checklist
./bin/generate-samples.sh
to update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH.master
cc @spacether