Skip to content

Commit

Permalink
Bump websockets to 11.0.3.
Browse files Browse the repository at this point in the history
Fix #1927.
  • Loading branch information
aaugustin committed Jul 29, 2023
1 parent 8239373 commit 22f880d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ h11 @ git+https://github.com/python-hyper/h11.git@master
# Explicit optionals
a2wsgi==1.7.0
wsproto==1.2.0
websockets==10.4
websockets==11.0.3

# Packaging
build==0.10.0
Expand Down
5 changes: 2 additions & 3 deletions tests/protocols/test_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ async def test_asgi_return_value(
unused_tcp_port: int,
):
"""
The ASGI callable should return 'None'. If it doesn't make sure that
The ASGI callable should return 'None'. If it doesn't, make sure that
the connection is closed with an error condition.
"""

Expand All @@ -597,9 +597,8 @@ async def connect(url):
port=unused_tcp_port,
)
async with run_server(config):
with pytest.raises(websockets.exceptions.ConnectionClosed) as exc_info:
with pytest.raises(websockets.exceptions.WebSocketException):
await connect(f"ws://127.0.0.1:{unused_tcp_port}")
assert exc_info.value.code == 1006


@pytest.mark.anyio
Expand Down
1 change: 0 additions & 1 deletion uvicorn/protocols/websockets/websockets_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ async def run_asgi(self) -> None:
elif result is not None:
msg = "ASGI callable should return None, but returned '%s'."
self.logger.error(msg, result)
await self.handshake_completed_event.wait()
self.transport.close()

async def asgi_send(self, message: "ASGISendEvent") -> None:
Expand Down

0 comments on commit 22f880d

Please sign in to comment.