Releases: frankie567/httpx-ws
Releases · frankie567/httpx-ws
v0.7.1
Bump version 0.7.0 → 0.7.1
Bug fixes and improvements
- Fix
ASGIWebSocketAsyncNetworkStream
implementation to avoid async tasks issues. Thanks @graingert 🎉
v0.7.0
Bump version 0.6.2 → 0.7.0
New features
- Allow to pass a custom
session_class
onconnect_ws
/aconnect_ws
functions. Thanks @GreyElaina 🎉
Breaking changes
- Drop Python 3.8 support.
Bug fixes and improvements
- Fix #29: prevent error when several tasks try to write simultaneously on the same websocket stream. Thanks @GreyElaina 🎉
- Fix #90: don't use a blocking portal to run the ASGIWebSocketTransport. Thanks @GreyElaina 🎉
v0.6.2
Bump version 0.6.1 → 0.6.2
Bug fixes and improvements
- Improve efficiency of
WebSocketSession
by reusing a single thread pool when waiting for messages. Thank you @davidbrochart 🎉
v0.6.1
Bump version 0.6.0 → 0.6.1
Bug fixes
- Fix (#73) anyio misusages. Thanks @agronholm 🎉
- Fix (#74) unclosed anyio streams. Thanks @agronholm 🎉
- Fix (#76) memory leak with non-async WebSocketSession. Thanks @ro-oliveira95 🎉
v0.6.0
Bump version 0.5.2 → 0.6.0
Breaking changes
AsyncWebSocketSession
andWebSocketSession
no longer accept thesubprotocol
parameter. It's automatically set from theresponse
headers (see below).
Note
If you only use the connect_ws
and aconnect_ws
functions, you don't need to change anything.
Improvements
AsyncWebSocketSession
andWebSocketSession
now accepts the original HTTPX handshake response in parameter. Thanks @WSH032 🎉
v0.5.2
Bump version 0.5.1 → 0.5.2
Bug fixes
- Set
anyio
dependency lower bound version to>4
v0.5.1
v0.5.0
Bump version 0.4.3 → 0.5.0
New features
Breaking changes
WebSocketSession
andAsyncWebSocketSession
are now context managers. If you were using them directly instead of relying onconnect_ws
andaconnect_ws
, you'll have to adapt your code accordingly:
with WebSocketSession(...) as session:
...
async with AsyncWebSocketSession(...) as session:
...
AsyncWebSocketSession.receive_*
methods may now raiseTimeoutError
instead ofasyncio.TimeoutError
:
Before
try:
event = await ws.receive(timeout=2.)
except asyncio.TimeoutError:
print("No event received.")
except WebSocketDisconnect:
print("Connection closed")
After
try:
event = await ws.receive(timeout=2.)
except TimeoutError:
print("No event received.")
except WebSocketDisconnect:
print("Connection closed")