Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise asyncio.TimeoutError on httpx.TimeoutException #123

Merged
merged 1 commit into from Apr 20, 2022

Conversation

gunyarakun
Copy link
Contributor

@gunyarakun gunyarakun commented Apr 19, 2022

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

src/aiodynamo/http/httpx.py Outdated Show resolved Hide resolved
@ojii
Copy link
Contributor

ojii commented Apr 19, 2022

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
Copy link
Contributor Author

To fix CircleCI, we have to fix the version of click used in black to 8.0.1.
psf/black#2964

@ojii
Copy link
Contributor

ojii commented Apr 20, 2022

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

@ojii ojii merged commit 8acf203 into HENNGE:master Apr 20, 2022
@ojii
Copy link
Contributor

ojii commented Apr 20, 2022

@gunyarakun thank you again, released as 22.4

@gunyarakun
Copy link
Contributor Author

@ojii Thank you for your quick review and release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants