-
Notifications
You must be signed in to change notification settings - Fork 1.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
Set timeout from init_config in requests wrapper as default #4226
Conversation
@@ -60,6 +60,13 @@ def test_config_multiple_timeouts(self): | |||
|
|||
assert http.options['timeout'] == (10, 4) | |||
|
|||
def test_config_init_config_override(self): |
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.
🔥
Codecov Report
|
6 similar comments
Codecov Report
|
Codecov Report
|
Codecov Report
|
Codecov Report
|
Codecov Report
|
Codecov Report
|
@@ -103,6 +103,7 @@ def __init__(self, instance, init_config, remapper=None, logger=None): | |||
# Update the default behavior for global settings | |||
default_fields['log_requests'] = init_config.get('log_requests', default_fields['log_requests']) | |||
default_fields['skip_proxy'] = init_config.get('skip_proxy', default_fields['skip_proxy']) | |||
default_fields['timeout'] = init_config.get('timeout', default_fields['timeout']) |
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.
Would that make sense to also add connect_timeout
and read_ timeout
to init config ?
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 will be addressed in a later PR that would set default_fields for all config options to the init_config
value if it exists.
What does this PR do?
Sets the default field to
timeout
frominit_config
if it exists.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached