HENNGE / aiodynamo

Asynchronous, fast, pythonic DynamoDB Client
https://aiodynamo.readthedocs.io/
Other
69 stars 20 forks source link

Raise asyncio.TimeoutError on httpx.TimeoutException #123

Closed gunyarakun closed 2 years ago

gunyarakun commented 2 years ago

Now asyncio.TimeoutError is handled in the client logic. But httpx wrapper raises httpx.TimeoutException. This pull request convert the exception and make the client be able to handle timeouts in httpx.

ref.) httpx timeout exceptions https://github.com/encode/httpx/blob/master/httpx/_exceptions.py#L7-L11

ref.) Custom HTTP Client Adaptor document https://github.com/HENNGE/aiodynamo/blob/2e6c4716a3ac9fe5669bbdcaa73e6bbe0f73cfbb/docs/advanced.rst

ojii commented 2 years ago

thank you for this pull request. looks good, the test failures are clearly unrelated. I'll try to figure out how to fix them.

gunyarakun commented 2 years ago

To fix CircleCI, we have to fix the version of click used in black to 8.0.1. https://github.com/psf/black/issues/2964

ojii commented 2 years ago

merging this despite CI failing, since I've fixed CI in other branches/PRs.

ojii commented 2 years ago

@gunyarakun thank you again, released as 22.4

gunyarakun commented 2 years ago

@ojii Thank you for your quick review and release!