@@ -138,7 +138,7 @@ async def create_windows_process(
138138 command : str ,
139139 args : list [str ],
140140 env : dict [str , str ] | None = None ,
141- errlog : TextIO | None = sys .stderr ,
141+ errlog : TextIO | int | None = sys .stderr ,
142142 cwd : Path | str | None = None ,
143143) -> Process | FallbackProcess :
144144 """Creates a subprocess in a Windows-compatible way with Job Object support.
@@ -155,7 +155,9 @@ async def create_windows_process(
155155 command (str): The executable to run
156156 args (list[str]): List of command line arguments
157157 env (dict[str, str] | None): Environment variables
158- errlog (TextIO | None): Where to send stderr output (defaults to sys.stderr)
158+ errlog (TextIO | int | None): Where to send stderr output. Accepts a text
159+ stream, an integer file descriptor (e.g. ``subprocess.DEVNULL``), or
160+ ``None`` (defaults to sys.stderr)
159161 cwd (Path | str | None): Working directory for the subprocess
160162
161163 Returns:
@@ -196,7 +198,7 @@ async def _create_windows_fallback_process(
196198 command : str ,
197199 args : list [str ],
198200 env : dict [str , str ] | None = None ,
199- errlog : TextIO | None = sys .stderr ,
201+ errlog : TextIO | int | None = sys .stderr ,
200202 cwd : Path | str | None = None ,
201203) -> FallbackProcess :
202204 """Create a subprocess using subprocess.Popen as a fallback when anyio fails.
0 commit comments