mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
concurrent.futures: Sync with Python 3.7 (#2343)
This commit is contained in:
committed by
Jelle Zijlstra
parent
e9a7f7cc0d
commit
5b2c8dc883
@@ -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: ...
|
||||
|
||||
@@ -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:
|
||||
|
||||
12
third_party/2/concurrent/futures/process.pyi
vendored
12
third_party/2/concurrent/futures/process.pyi
vendored
@@ -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: ...
|
||||
|
||||
9
third_party/2/concurrent/futures/thread.pyi
vendored
9
third_party/2/concurrent/futures/thread.pyi
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user