mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
concurrent.futures: new params in 3.11 (#7919)
fdc0e09c33
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -53,7 +53,13 @@ class _ResultItem:
|
||||
work_id: int
|
||||
exception: Exception
|
||||
result: Any
|
||||
def __init__(self, work_id: int, exception: Exception | None = ..., result: Any | None = ...) -> None: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
exit_pid: int | None
|
||||
def __init__(
|
||||
self, work_id: int, exception: Exception | None = ..., result: Any | None = ..., exit_pid: int | None = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(self, work_id: int, exception: Exception | None = ..., result: Any | None = ...) -> None: ...
|
||||
|
||||
class _CallItem:
|
||||
work_id: int
|
||||
@@ -86,11 +92,31 @@ if sys.version_info >= (3, 7):
|
||||
|
||||
def _get_chunks(*iterables: Any, chunksize: int) -> Generator[tuple[Any, ...], None, None]: ...
|
||||
def _process_chunk(fn: Callable[..., Any], chunk: tuple[Any, None, None]) -> Generator[Any, None, None]: ...
|
||||
def _sendback_result(
|
||||
result_queue: SimpleQueue[_WorkItem[Any]], work_id: int, result: Any | None = ..., exception: Exception | None = ...
|
||||
) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
if sys.version_info >= (3, 11):
|
||||
def _sendback_result(
|
||||
result_queue: SimpleQueue[_WorkItem[Any]],
|
||||
work_id: int,
|
||||
result: Any | None = ...,
|
||||
exception: Exception | None = ...,
|
||||
exit_pid: int | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
else:
|
||||
def _sendback_result(
|
||||
result_queue: SimpleQueue[_WorkItem[Any]], work_id: int, result: Any | None = ..., exception: Exception | None = ...
|
||||
) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
def _process_worker(
|
||||
call_queue: Queue[_CallItem],
|
||||
result_queue: SimpleQueue[_ResultItem],
|
||||
initializer: Callable[..., None] | None,
|
||||
initargs: tuple[Any, ...],
|
||||
max_tasks: int | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
elif sys.version_info >= (3, 7):
|
||||
def _process_worker(
|
||||
call_queue: Queue[_CallItem],
|
||||
result_queue: SimpleQueue[_ResultItem],
|
||||
@@ -153,7 +179,17 @@ class ProcessPoolExecutor(Executor):
|
||||
_executor_manager_thread_wakeup: _ThreadWakeup
|
||||
_result_queue: SimpleQueue[Any]
|
||||
_work_ids: Queue[Any]
|
||||
if sys.version_info >= (3, 7):
|
||||
if sys.version_info >= (3, 11):
|
||||
def __init__(
|
||||
self,
|
||||
max_workers: int | None = ...,
|
||||
mp_context: BaseContext | None = ...,
|
||||
initializer: Callable[..., None] | None = ...,
|
||||
initargs: tuple[Any, ...] = ...,
|
||||
*,
|
||||
max_tasks_per_child: int | None = ...,
|
||||
) -> None: ...
|
||||
elif sys.version_info >= (3, 7):
|
||||
def __init__(
|
||||
self,
|
||||
max_workers: int | None = ...,
|
||||
|
||||
@@ -33,11 +33,6 @@ asyncio.sslproto._SSLProtocolTransport.set_read_buffer_limits
|
||||
asyncio.sslproto.add_flowcontrol_defaults
|
||||
bdb.Breakpoint.clearBreakpoints
|
||||
builtins.dict.get
|
||||
concurrent.futures.ProcessPoolExecutor.__init__
|
||||
concurrent.futures.process.ProcessPoolExecutor.__init__
|
||||
concurrent.futures.process._ResultItem.__init__
|
||||
concurrent.futures.process._process_worker
|
||||
concurrent.futures.process._sendback_result
|
||||
configparser.LegacyInterpolation.__init__
|
||||
contextvars.Context.__init__
|
||||
distutils.dist.DistributionMetadata.set_classifiers
|
||||
|
||||
Reference in New Issue
Block a user