Aymeric Augustin
Aymeric Augustin
Indeed, I believe that you should always re-raise `asyncio.CancelledError` when you catch it, else all bets are off. (This is why it no longer inherits `Exception` — to prevent accidentally...
I tried to implement this and ran into a complication. `WebSocketCommonProtocol.ping()` accepts either `str` of `bytes`. If it receives a `str`, it encodes it to `bytes`. If we want to...
I just added a built-in solution to measure latency in #1195. For this use case, no further changes are needed. ---- Upon further thought, my initial answer was incorrect. If...
I'm currently working on refactoring websockets to provide a sans-I/O layer. If it's ready within a reasonable timeframe, perhaps you could use it. It will handle correctly a few things...
FYI I started implementing a Sans-I/O layer for websockets: https://github.com/aaugustin/websockets/issues/466 It may not be obvious from the first commits because I have to untangle a lot of stuff from asyncio...
So, here's how I think the bridge could work. Since we're talking about httpx, I'm focusing on the client side here, but the same logic would apply on the server...
The Sans I/O layer in websockets is (AFAIK) feature complete with full test coverage. However, websockets doesn't uses it yet and I haven't written the documentation yet. If you have...
wsproto is perfectly fine as well :-)
The reason is that I'm maintaining a WebSocket library, not a HTTP library. Deciding not to implement a HTTP library is purely a decision of where I want to spend...
It will always be possible to move the line "just a bit". At some point I have to draw the line. I believe that the place where it's currently drawn...