From: kriskros341 Date: Wed, 27 Jan 2021 13:36:35 +0000 (+0100) Subject: write_message method of WebSocketClientConnection now accepts dict as input X-Git-Tag: v6.2.0b1~53^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de75bc9e6a3fd6218674f52b7adbb4d5f5e51b41;p=thirdparty%2Ftornado.git write_message method of WebSocketClientConnection now accepts dict as input --- diff --git a/tornado/websocket.py b/tornado/websocket.py index 33d7a94d4..256a5ee7f 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -1072,7 +1072,7 @@ class WebSocketProtocol13(WebSocketProtocol): return self.stream.write(frame) def write_message( - self, message: Union[str, bytes, dict], binary: bool = False + self, message: Union[str, bytes, Dict[str, any]], binary: bool = False ) -> "Future[None]": """Sends the given message to the client of this Web Socket.""" if binary: @@ -1495,7 +1495,7 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection): future_set_result_unless_cancelled(self.connect_future, self) def write_message( - self, message: Union[str, bytes, dict], binary: bool = False + self, message: Union[str, bytes, Dict[str, any]], binary: bool = False ) -> "Future[None]": """Sends a message to the WebSocket server.