trio-websocket
trio-websocket copied to clipboard
WebSocket client and server implementation for Python Trio
I've got a client of an internal tool who runs into ABNORMAL_CLOSURE / code=1006; and it's providing difficult to reproduce other than on his machine. The debug log pattern is:...
After upgrading to `trio >= 0.25.0`, the exception-related tests start failing: ```pytb python -m pytest --cov=trio_websocket --no-cov-on-fail ============================= test session starts ============================== platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0 rootdir:...
See this PR for context: https://github.com/python-trio/trio-websocket/pull/185
The short of it is that _handle_ping_event() sometimes tries to send a reply to a closing socket, which raises an (avoidable) exception from within the websocket thread. This can lead...
The default size of 4 KiB is very small, and caused a lot of loops receiving buffers, that were clearly visible in benchmarks. Also, it's not needed: ` Optional; if...
Blacken
I'm working on fixing a bug with connection shutdown, and standarizing the formatting first makes the source easier to work with
Right now, a developer must manually serialise and deserialise packets from or to a serialised JSON str of `s`. This leads towards writing unnecessary boilerplate such as this. I would...
I tried conncet to server through proxy, by setting proxy environment. like `set http_proxy=http://xxxx` but it doesn't work.
The connection object could be an iterator that yields incoming messages, i.e. as an alternative to calling `get_message()`. ``` # simple WebSocket echo async with open_websocket(…) as websocket: async for...
Experimental port of trio-websocket to anyio status: * partial port of `_impl.py` * trio is still being called for networking and some misc. functions * one test is timing out