Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I'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-tim...


Right. 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.


I absolutely agree. According to this comment [1] they're planning to introduce it in v3.

[1] https://github.com/psf/requests/issues/3070#issuecomment-328...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: