Add timeout argument to Popen communicate (#423)

This was added in Python 3.3
This commit is contained in:
Daniël van Eeden
2016-08-04 00:39:35 +02:00
committed by Matthias Kramm
parent 07bf49f55a
commit 51a519b358

View File

@@ -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: ...