From 52e69efa6f7990ea594172df283d11448f714711 Mon Sep 17 00:00:00 2001 From: David Soria Parra Date: Thu, 12 Dec 2024 23:17:59 +0000 Subject: [PATCH] Fix deprecation warning --- src/mcp/server/sse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mcp/server/sse.py b/src/mcp/server/sse.py index 65369a7..3062b32 100644 --- a/src/mcp/server/sse.py +++ b/src/mcp/server/sse.py @@ -102,9 +102,9 @@ async def connect_sse(self, scope: Scope, receive: Receive, send: Send): self._read_stream_writers[session_id] = read_stream_writer logger.debug(f"Created new session with ID: {session_id}") - sse_stream_writer, sse_stream_reader = anyio.create_memory_object_stream( - 0, dict[str, Any] - ) + sse_stream_writer, sse_stream_reader = anyio.create_memory_object_stream[ + dict[str, Any] + ](0) async def sse_writer(): logger.debug("Starting SSE writer")