3 ms·
I wish that requests had a default timeout instead of defaulting to waiting forever. It's very easy for devs to forget to think about timeouts, but inevitably
by sciurus 7y ago
I wish that requests had a default timeout instead of defaulting to waiting forever.
It's very easy for devs to forget to think about timeouts, but inevitably that ends in a cascading production outage.
- dhxt 7y agoI'm not sure if you noticed, but the post contains a section on how to set default timeouts. https://findwork.dev/blog/advanced-usage-python-requests-timeouts-retries-hooks/#setting-default-timeouts https://findwork.dev/blog/advanced-usage-python-requests-tim...
- sciurus 7y agoRight. I'm saying the library should set a default timeout by default, which you could then change if needed. Of course, whatever it chose would inevitably be wrong for many scenarios, it would be less wrong than defaulting to waiting forever.
- dhxt 7y agoI absolutely agree. According to this comment [1] they're planning to introduce it in v3. [1] https://github.com/psf/requests/issues/3070#issuecomment-328083039 https://github.com/psf/requests/issues/3070#issuecomment-328...