diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index 5f2563a34789..084d866182f6 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -303,18 +303,10 @@ compression.lzma compression.zlib compression.zstd concurrent.futures.__all__ -concurrent.futures.Executor.map concurrent.futures.InterpreterPoolExecutor -concurrent.futures.ProcessPoolExecutor.kill_workers -concurrent.futures.ProcessPoolExecutor.map -concurrent.futures.ProcessPoolExecutor.terminate_workers concurrent.futures.ThreadPoolExecutor.BROKEN concurrent.futures.ThreadPoolExecutor.prepare_context -concurrent.futures._base.Executor.map concurrent.futures.interpreter -concurrent.futures.process.ProcessPoolExecutor.kill_workers -concurrent.futures.process.ProcessPoolExecutor.map -concurrent.futures.process.ProcessPoolExecutor.terminate_workers concurrent.futures.thread.ThreadPoolExecutor.BROKEN concurrent.futures.thread.ThreadPoolExecutor.prepare_context concurrent.futures.thread.WorkerContext diff --git a/stdlib/concurrent/futures/_base.pyi b/stdlib/concurrent/futures/_base.pyi index 7294b69567d6..fbf07a3fc78f 100644 --- a/stdlib/concurrent/futures/_base.pyi +++ b/stdlib/concurrent/futures/_base.pyi @@ -54,9 +54,20 @@ class Future(Generic[_T]): class Executor: def submit(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]: ... - def map( - self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = None, chunksize: int = 1 - ) -> Iterator[_T]: ... + if sys.version_info >= (3, 14): + def map( + self, + fn: Callable[..., _T], + *iterables: Iterable[Any], + timeout: float | None = None, + chunksize: int = 1, + buffersize: int | None = None, + ) -> Iterator[_T]: ... + else: + def map( + self, fn: Callable[..., _T], *iterables: Iterable[Any], timeout: float | None = None, chunksize: int = 1 + ) -> Iterator[_T]: ... + def shutdown(self, wait: bool = True, *, cancel_futures: bool = False) -> None: ... def __enter__(self) -> Self: ... def __exit__( diff --git a/stdlib/concurrent/futures/process.pyi b/stdlib/concurrent/futures/process.pyi index 9c904f793fa9..607990100369 100644 --- a/stdlib/concurrent/futures/process.pyi +++ b/stdlib/concurrent/futures/process.pyi @@ -236,3 +236,7 @@ class ProcessPoolExecutor(Executor): def _start_executor_manager_thread(self) -> None: ... def _adjust_process_count(self) -> None: ... + + if sys.version_info >= (3, 14): + def kill_workers(self) -> None: ... + def terminate_workers(self) -> None: ...