diff --git a/stdlib/3/concurrent/futures/process.pyi b/stdlib/3/concurrent/futures/process.pyi index c36180ff8..3d50123c8 100644 --- a/stdlib/3/concurrent/futures/process.pyi +++ b/stdlib/3/concurrent/futures/process.pyi @@ -1,4 +1,4 @@ -from typing import Optional, Any +from typing import Any, Callable, Optional, Tuple from ._base import Future, Executor import sys @@ -7,5 +7,11 @@ EXTRA_QUEUED_CALLS = ... # type: Any if sys.version_info >= (3,): class BrokenProcessPool(RuntimeError): ... -class ProcessPoolExecutor(Executor): - def __init__(self, max_workers: Optional[int] = ...) -> None: ... +if sys.version_info >= (3, 7): + class ProcessPoolExecutor(Executor): + def __init__(self, max_workers: Optional[int] = ..., + initializer: Optional[Callable[..., None]] = ..., + initargs: Tuple[Any, ...] = ...) -> None: ... +else: + class ProcessPoolExecutor(Executor): + def __init__(self, max_workers: Optional[int] = ...) -> None: ... diff --git a/stdlib/3/concurrent/futures/thread.pyi b/stdlib/3/concurrent/futures/thread.pyi index 4f5b501b0..983594dc7 100644 --- a/stdlib/3/concurrent/futures/thread.pyi +++ b/stdlib/3/concurrent/futures/thread.pyi @@ -1,9 +1,14 @@ -from typing import Optional +from typing import Any, Callable, Optional, Tuple from ._base import Executor, Future import sys class ThreadPoolExecutor(Executor): - if sys.version_info >= (3, 6) or sys.version_info < (3,): + if sys.version_info >= (3, 7): + def __init__(self, max_workers: Optional[int] = ..., + thread_name_prefix: str = ..., + initializer: Optional[Callable[..., None]] = ..., + initargs: Tuple[Any, ...] = ...) -> None: ... + elif sys.version_info >= (3, 6) or sys.version_info < (3,): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ...) -> None: ... else: diff --git a/third_party/2/concurrent/futures/process.pyi b/third_party/2/concurrent/futures/process.pyi index c36180ff8..3d50123c8 100644 --- a/third_party/2/concurrent/futures/process.pyi +++ b/third_party/2/concurrent/futures/process.pyi @@ -1,4 +1,4 @@ -from typing import Optional, Any +from typing import Any, Callable, Optional, Tuple from ._base import Future, Executor import sys @@ -7,5 +7,11 @@ EXTRA_QUEUED_CALLS = ... # type: Any if sys.version_info >= (3,): class BrokenProcessPool(RuntimeError): ... -class ProcessPoolExecutor(Executor): - def __init__(self, max_workers: Optional[int] = ...) -> None: ... +if sys.version_info >= (3, 7): + class ProcessPoolExecutor(Executor): + def __init__(self, max_workers: Optional[int] = ..., + initializer: Optional[Callable[..., None]] = ..., + initargs: Tuple[Any, ...] = ...) -> None: ... +else: + class ProcessPoolExecutor(Executor): + def __init__(self, max_workers: Optional[int] = ...) -> None: ... diff --git a/third_party/2/concurrent/futures/thread.pyi b/third_party/2/concurrent/futures/thread.pyi index 4f5b501b0..983594dc7 100644 --- a/third_party/2/concurrent/futures/thread.pyi +++ b/third_party/2/concurrent/futures/thread.pyi @@ -1,9 +1,14 @@ -from typing import Optional +from typing import Any, Callable, Optional, Tuple from ._base import Executor, Future import sys class ThreadPoolExecutor(Executor): - if sys.version_info >= (3, 6) or sys.version_info < (3,): + if sys.version_info >= (3, 7): + def __init__(self, max_workers: Optional[int] = ..., + thread_name_prefix: str = ..., + initializer: Optional[Callable[..., None]] = ..., + initargs: Tuple[Any, ...] = ...) -> None: ... + elif sys.version_info >= (3, 6) or sys.version_info < (3,): def __init__(self, max_workers: Optional[int] = ..., thread_name_prefix: str = ...) -> None: ... else: