requests.{get,post} timeout

Chris Angelico rosuav at gmail.com
Tue Aug 22 15:21:53 EDT 2017


On Wed, Aug 23, 2017 at 5:06 AM, Jon Ribbens <jon+usenet at unequivocal.eu> wrote:
>> You can always add in the overall timeout separately. If the low-level
>> timeout were implemented that way, there would be no way to externally
>> add the other form of timeout. Therefore the only sane way to
>> implement the request timeout is a between-byte limit.
>
> 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.

ChrisA



More information about the Python-list mailing list