Uh oh!
There was an error while loading. Please reload this page.
Fix bug with async socks proxy and tracing. - #849
Conversation
karpetrosyan
commented
Nov 22, 2023
How can I reproduce this issue locally? |
@karpetrosyan use async interface and socks5 proxy. e.g.: #! /usr/bin/env pythonimportasyncioimporthttpxasyncdeftrace_func(event, data):
print(f'{event=}{data=}')
asyncdefmake_request():
async_client=httpx.AsyncClient(
proxies={'all://': 'socks5://non-existed-domain.com'},
)
asyncwithasync_clientasclient:
response=awaitclient.request(
"GET", "https://www.encode.io", extensions={"trace": trace_func}
)
print(response)
asyncio.run(make_request()) |
Yes, I see the problem. We also need a changelog for this PR. |
cono
commented
Nov 22, 2023
@karpetrosyan added |
cono
commented
Nov 22, 2023
I wonder why person who added this code haven't covered this with tests. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
karpetrosyan
commented
Nov 23, 2023
The code is actually covered, at least, because we have 100% code coverage.
If you have found a bug that has not been tested and you have considered opening the pull request to fix that bug, you MUST add a test case, especially when it was requested by the maintainer. There are rules for how this project should be maintained. Anyway, I think we don't need a test case for this pull request. Maybe we could add a rule to unasync.py so we can avoid this kind of situation. If @zanieb is okay with that, we can skip the test case for this change. Thanks for this pull request @cono 🙏 |
cono
commented
Nov 23, 2023
Guys, you have a bug in a library which crash application in particular circumstances, and isntead of accepting 2 line changes, you making discussion for 2 days about nothing. It's kinda like a joke to me. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
If you are using socks proxy, asynchronous client and tracing, it fails with the following error:
Checklist