Discussion: "Timeouts and cancellation for humans"

So requests doesn’t have to do anything to pass this through – when it eventually sends and receives data over the network, those primitive calls will automatically have the deadline applied.

Just to be clear – this refers to a hypothetical requests library with support for async and trio in particular (as implemented e.g. by asks), not the actual requests library, right? I tried running requests.get on a slow responding server inside a with trio.move_on_after(...) block, and trio’s timeout was not applied.

Not complaining, just making sure I understand this correctly – if it worked without any effort required from third-party library developers, it would be downright magical :slight_smile:

As an aside, thank you so much for all your posts related to async, as well as the trio docs! Your writing is top-notch, you manage to keep it accessible yet technically detailed, a rare ability :slight_smile: