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

There is no way to use the default session timeout #616

Open
mykola-mokhnach opened this issue Apr 25, 2023 · 2 comments
Open

There is no way to use the default session timeout #616

mykola-mokhnach opened this issue Apr 25, 2023 · 2 comments

Comments

@mykola-mokhnach
Copy link
Contributor

All public methods of Storage class have a default timeout value of type int. This value effectively overrides any timeout values provided to Session object on Storage creation.

I would expect the timeout value to be optional, so it does not always override default session timeouts implicitly (10 seconds is too low for generic downloads and uploads).

@TheKevJames
Copy link
Member

@mykola-mokhnach good point, looks like we've ended up with some weird multiple layers of timeout overrides at this point. We're about to release a major version bump -- sounds like today is a good day to introduce the breaking change to fix this!

Thanks for calling this out.

@TheKevJames
Copy link
Member

Turns out the plumbing for this is actually quite difficult -- I got started in an implementation here, but the rest-vs-aio code divide and the variations in how requests and aiohttp handle differing value is quite the nightmare here. I won't be targeting this for the upcoming major, but will keep thinking about it (and of course, happy to review any PRs or take any suggestions!).

It's likely we'll need to do some refactoring before this is easy enough to implement; one idea we've tossed around is to migrate to httpx (since it supports aio and sync modes), which would let us remove a whole lot of the build-time variances between libraries. Doing that first might save a whole lot of effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants