hip icon indicating copy to clipboard operation
hip copied to clipboard

Timeout handling

Open njsmith opened this issue 7 years ago • 1 comments
trafficstars

We don't have a coherent story for timeout handling yet. I think at this point we do pass timeouts through from the external APIs into the backends, but:

  • the Trio and Twisted don't actually implement timeouts yet

  • we don't have a general strategy for reporting timeouts

It used to be that timeout handling involved some coordination between the urllib3 code and the network layer, where urllib3 would set some special options to make timeouts happen, and then catch the native timeout exceptions (like socket.timeout) and translate them into the exceptions used in urllib3's public API.

I think we should figure out what exceptions our users are expecting, and make all the backends responsible for raising these directly, and remove the translation layer.

njsmith avatar May 15 '18 01:05 njsmith

An issue with the timeout handling in urllib3 is that not timeout is applied when sending the actual request, see https://github.com/python-trio/urllib3/pull/57#discussion_r223247959.

pquentin avatar Oct 08 '18 15:10 pquentin