File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import sys
33from contextlib import asynccontextmanager
44from pathlib import Path
5- from typing import Literal
5+ from typing import Literal , TextIO
66
77import anyio
88import anyio .lowlevel
@@ -87,7 +87,7 @@ class StdioServerParameters(BaseModel):
8787
8888
8989@asynccontextmanager
90- async def stdio_client (server : StdioServerParameters ):
90+ async def stdio_client (server : StdioServerParameters , errlog : TextIO = sys . stderr ):
9191 """
9292 Client transport for stdio: this will connect to a server by spawning a
9393 process and communicating with it over stdin/stdout.
@@ -104,7 +104,7 @@ async def stdio_client(server: StdioServerParameters):
104104 process = await anyio .open_process (
105105 [server .command , * server .args ],
106106 env = server .env if server .env is not None else get_default_environment (),
107- stderr = sys . stderr ,
107+ stderr = errlog ,
108108 cwd = server .cwd ,
109109 )
110110
You can’t perform that action at this time.
0 commit comments