requests.{get,post} timeout

Jon Ribbens jon+usenet at unequivocal.eu
Wed Aug 23 07:10:22 EDT 2017


On 2017-08-22, Chris Angelico <rosuav at gmail.com> wrote:
> On Wed, Aug 23, 2017 at 5:06 AM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> I have no idea what you mean here. The only sane way to implement the
>> request timeout is to provide both types of timeout.
>
> You could provide both, but since one of them can be handled
> externally (with a thread, with a SIGALRM, or with some other sort of
> time limiting), the other one MUST be provided by the request.

I am interested to learn what you mean by "with a thread". How would
one execute a requests, er, request in a thread with a proper timeout?



More information about the Python-list mailing list