Aymeric Augustin
Aymeric Augustin
Looking at all HTTP error codes, actually, very few are worth retrying. - Redirects (301, 302, 303, 307, 308) should be followed. - Server crashed / down / unreachable (500,...
So my proposal is to retry: - all I/O errors, timeouts, invalid responses, etc. - if the HTTP request gets a valid HTTP response, only HTTP 500, 502, 503, 504...
> ```python > self.is_exception_fatal(exc) > ``` Code changes are getting pretty minimal at this point ;-) > What do you think about process_exception? I like it! If we're just adding:...
Agreed, that would be too complicated.
On the semantics of `process_exception` — you have a valid point — returning en exception is less natural than raising it. The counter point is — if the API is...
The PR is missing tests. I did some basic manual testing and it appears to work. ---- > If I am mistaken or missing something, please tell me. One thing...
About the API of `process_request` — I decided to support both forms (`return` and `raise`). Indeed, the natural patterns are: - `return exc` to keep the original exception and make...
I added tests to #1491. Still two things to do before merging: 1. tests hang under Python 3.8 😡 2. I'm not happy with how the logger is set up...
Tests were using HTTP 418, which was added in Python 3.9 🤦♂️
You can install directly the latest commit of the main branch -- see instructions for various situations in this blog post: https://adamj.eu/tech/2019/03/11/pip-install-from-a-git-repository/ I'd like to bring the new asyncio implementation...