Skip to content
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

Add connect/read timeout option #215

Merged
merged 4 commits into from
May 12, 2020
Merged

Add connect/read timeout option #215

merged 4 commits into from
May 12, 2020

Conversation

lbalmaceda
Copy link
Contributor

Changes

The connect and read timeout can be customized in the requests dependency whenever an HTTP method is called. This is a per request setting, not global.

The accepted values are either a float to setting both timeout values to the same value, or a tuple to decide values separately.

Open to suggestions

  • The default timeout value for both attributes on this PR is set to 5 seconds. Should that change?

References

This PR is built on top of #209 (see first commit) and supersedes it.

Docs on the attribute: http://requests.kennethreitz.org/en/master/user/advanced/#id16

Testing

Followed the idea on this comment #209 (comment)

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@lbalmaceda lbalmaceda added CH: Added medium Medium review labels May 7, 2020
@lbalmaceda lbalmaceda added this to the v3-Next milestone May 7, 2020
@lbalmaceda lbalmaceda requested a review from a team May 7, 2020 23:57
@lbalmaceda lbalmaceda changed the title Adds connect/read timeout option Add connect/read timeout option May 8, 2020
@adamjmcgrath
Copy link
Contributor

lgtm - it's a shame there isn't a global/environmental variable way of setting the timeout in requests

@lbalmaceda lbalmaceda merged commit e35d645 into master May 12, 2020
@lbalmaceda lbalmaceda deleted the feat-timeout branch May 12, 2020 18:29
@lbalmaceda lbalmaceda modified the milestones: v3-Next, 3.10.0 Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added medium Medium review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants