diff --git a/stdlib/3/subprocess.pyi b/stdlib/3/subprocess.pyi index 43934b5ef..9de5bf4c0 100644 --- a/stdlib/3/subprocess.pyi +++ b/stdlib/3/subprocess.pyi @@ -2,6 +2,7 @@ # Based on http://docs.python.org/3.2/library/subprocess.html +import sys from typing import Sequence, Any, Mapping, Callable, Tuple, IO, Optional, Union # Same args as Popen.__init__ @@ -101,7 +102,10 @@ class Popen: def poll(self) -> int: ... def wait(self) -> int: ... # Return str/bytes - def communicate(self, input=...) -> Tuple[Any, Any]: ... + if sys.version_info >= (3, 3): + def communicate(self, input=..., timeout: float = ...) -> Tuple[Any, Any]: ... + else: + def communicate(self, input=...) -> Tuple[Any, Any]: ... def send_signal(self, signal: int) -> None: ... def terminate(self) -> None: ... def kill(self) -> None: ...