diff --git a/stdlib/3.4/asyncio/coroutines.pyi b/stdlib/3.4/asyncio/coroutines.pyi index ad0178a10..4f1eb5de7 100644 --- a/stdlib/3.4/asyncio/coroutines.pyi +++ b/stdlib/3.4/asyncio/coroutines.pyi @@ -1,8 +1,10 @@ -from typing import Callable, Any +from typing import Callable, Any, TypeVar __all__ = ['coroutine', 'iscoroutinefunction', 'iscoroutine'] -def coroutine(func: Callable[..., Any]) -> Callable[..., Any]: ... +_T = TypeVar('_T') + +def coroutine(func: _T) -> _T: ... def iscoroutinefunction(func: Callable[..., Any]) -> bool: ... def iscoroutine(obj: Any) -> bool: ... diff --git a/stdlib/3.4/asyncio/subprocess.pyi b/stdlib/3.4/asyncio/subprocess.pyi index 8d383076a..a6e3b6e8b 100644 --- a/stdlib/3.4/asyncio/subprocess.pyi +++ b/stdlib/3.4/asyncio/subprocess.pyi @@ -1,4 +1,4 @@ -from typing import Any, AnyStr, Tuple +from typing import Any, AnyStr, Tuple, Union __all__ = ['create_subprocess_exec', 'create_subprocess_shell'] @@ -35,12 +35,12 @@ class Process: def terminatate(self) -> None: ... def kill(self) -> None: ... @coroutine - def communicate(self, input: AnyStr = ...) -> Tuple[AnyStr, AnyStr]: ... + def communicate(self, input: bytes = ...) -> Tuple[bytes, bytes]: ... @coroutine def create_subprocess_shell( - *Args: AnyStr, + *Args: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 stdin: int = ..., stdout: int = ..., stderr: int = ..., @@ -50,7 +50,7 @@ def create_subprocess_shell( @coroutine def create_subprocess_exec( - program: AnyStr, + program: Union[str, bytes], # Union used instead of AnyStr due to mypy issue #1236 *args: Any, stdin: int = ..., stdout: int = ...,