From d494114214d64314f3c583417850abd61a00faa3 Mon Sep 17 00:00:00 2001 From: Suren Nihalani Date: Sun, 28 May 2017 18:58:23 -0700 Subject: [PATCH] asyncio.subprocess: fix type to include IO instead of just int and match Popen (#1366) Fixes #1365 --- stdlib/3.4/asyncio/subprocess.pyi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stdlib/3.4/asyncio/subprocess.pyi b/stdlib/3.4/asyncio/subprocess.pyi index f975f462c..78feb8e20 100644 --- a/stdlib/3.4/asyncio/subprocess.pyi +++ b/stdlib/3.4/asyncio/subprocess.pyi @@ -3,7 +3,7 @@ from asyncio import protocols from asyncio import streams from asyncio import transports from asyncio.coroutines import coroutine -from typing import Any, AnyStr, Generator, List, Optional, Tuple, Union +from typing import Any, AnyStr, Generator, List, Optional, Tuple, Union, IO __all__: List[str] @@ -46,9 +46,9 @@ class Process: @coroutine def create_subprocess_shell( *Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 - stdin: int = ..., - stdout: int = ..., - stderr: int = ..., + stdin: Union[int, IO[Any], None] = ..., + stdout: Union[int, IO[Any], None] = ..., + stderr: Union[int, IO[Any], None] = ..., loop: events.AbstractEventLoop = ..., limit: int = ..., **kwds: Any @@ -58,9 +58,9 @@ def create_subprocess_shell( def create_subprocess_exec( program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 *args: Any, - stdin: int = ..., - stdout: int = ..., - stderr: int = ..., + stdin: Union[int, IO[Any], None] = ..., + stdout: Union[int, IO[Any], None] = ..., + stderr: Union[int, IO[Any], None] = ..., loop: events.AbstractEventLoop = ..., limit: int = ..., **kwds: Any