Currently the requests calls do not specify a timeout, which means a hanging connection will never return as there's no default. This sets a hopefully sane default of 30s.
You can tell Requests to stop waiting for a response after a given number of seconds with the timeout parameter. Nearly all production code should use this parameter in nearly all requests. Failure to do so can cause your program to hang indefinitely
Currently the
requests
calls do not specify a timeout, which means a hanging connection will never return as there's no default. This sets a hopefully sane default of 30s.Quote from requests documentation: