Skip to content

Commit 4d45bb8

Browse files
refactor: rename DummyProcess to FallbackProcess in Windows stdio (#1015)
1 parent 6747688 commit 4d45bb8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/mcp/client/stdio/win32.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_windows_executable_command(command: str) -> str:
4646
return command
4747

4848

49-
class DummyProcess:
49+
class FallbackProcess:
5050
"""
5151
A fallback process wrapper for Windows to handle async I/O
5252
when using subprocess.Popen, which provides sync-only FileIO objects.
@@ -115,7 +115,7 @@ async def create_windows_process(
115115
env: dict[str, str] | None = None,
116116
errlog: TextIO | None = sys.stderr,
117117
cwd: Path | str | None = None,
118-
) -> DummyProcess:
118+
) -> FallbackProcess:
119119
"""
120120
Creates a subprocess in a Windows-compatible way.
121121
@@ -131,7 +131,7 @@ async def create_windows_process(
131131
cwd (Path | str | None): Working directory for the subprocess
132132
133133
Returns:
134-
DummyProcess: Async-compatible subprocess with stdin and stdout streams
134+
FallbackProcess: Async-compatible subprocess with stdin and stdout streams
135135
"""
136136
try:
137137
# Try launching with creationflags to avoid opening a new console window
@@ -145,7 +145,7 @@ async def create_windows_process(
145145
bufsize=0, # Unbuffered output
146146
creationflags=getattr(subprocess, "CREATE_NO_WINDOW", 0),
147147
)
148-
return DummyProcess(popen_obj)
148+
return FallbackProcess(popen_obj)
149149

150150
except Exception:
151151
# If creationflags failed, fallback without them
@@ -158,10 +158,10 @@ async def create_windows_process(
158158
cwd=cwd,
159159
bufsize=0,
160160
)
161-
return DummyProcess(popen_obj)
161+
return FallbackProcess(popen_obj)
162162

163163

164-
async def terminate_windows_process(process: Process | DummyProcess):
164+
async def terminate_windows_process(process: Process | FallbackProcess):
165165
"""
166166
Terminate a Windows process.
167167

0 commit comments

Comments
 (0)