From 6881f41f8e10bf6f7fd806454f8b8359b9f3d325 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 18 Aug 2025 11:37:51 +0200 Subject: swiftstory: move out of legacy websockets 14.0 implementation https://websockets.readthedocs.io/en/stable/howto/upgrade.html Signed-off-by: Olivier Gayot --- swiftstory/interface/ws.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swiftstory/interface/ws.py') diff --git a/swiftstory/interface/ws.py b/swiftstory/interface/ws.py index 082ed1a..e9150dd 100644 --- a/swiftstory/interface/ws.py +++ b/swiftstory/interface/ws.py @@ -7,7 +7,7 @@ import logging from typing import Union import websockets.exceptions -from websockets.server import WebSocketServerProtocol +from websockets.asyncio.server import ServerConnection from swiftstory.client import Client from swiftstory.exception import WrongAction, JoinError @@ -20,7 +20,7 @@ class WebsocketsInterface: def __init__(self, game_manager: GameManager): self.game_manager = game_manager - async def connection_handler(self, websocket: WebSocketServerProtocol, path: str) -> None: + async def connection_handler(self, websocket: ServerConnection) -> None: """ Coroutine that handles one websocket connection. """ client = Client(websocket, self.game_manager) -- cgit v1.2.3