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/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swiftstory/client.py') diff --git a/swiftstory/client.py b/swiftstory/client.py index cd5e82a..0831cb0 100644 --- a/swiftstory/client.py +++ b/swiftstory/client.py @@ -5,7 +5,7 @@ import logging from typing import Optional import websockets.exceptions -from websockets.server import WebSocketServerProtocol +from websockets.asyncio.server import ServerConnection from swiftstory.game import Game from swiftstory.game_manager import GameManager @@ -17,7 +17,7 @@ class Client: """ Represent a client. A client manages a (web)socket to communicate with the outside world. It also manages the associated player when in a game. """ - def __init__(self, socket: WebSocketServerProtocol, game_manager: GameManager) -> None: + def __init__(self, socket: ServerConnection, game_manager: GameManager) -> None: self.game: Optional[Game] = None self.game_manager: GameManager = game_manager -- cgit v1.2.3