From 6083bc2da724c154fb97ea3eca0dd271aa87da41 Mon Sep 17 00:00:00 2001 From: ebonnal Date: Mon, 16 Dec 2024 13:00:28 +0000 Subject: [PATCH 1/2] add the `buffersize` param of `concurrent.futures.Executor.map` --- stdlib/concurrent/futures/_base.pyi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stdlib/concurrent/futures/_base.pyi b/stdlib/concurrent/futures/_base.pyi index 0c019457902b..56a25f518d5f 100644 --- a/stdlib/concurrent/futures/_base.pyi +++ b/stdlib/concurrent/futures/_base.pyi @@ -62,9 +62,15 @@ class Executor: else: 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]: ... + if sys.version_info >= (3, 9): def shutdown(self, wait: bool = True, *, cancel_futures: bool = False) -> None: ... else: From 6caef32c1e6c29c0f7c1a757b185d1f6c2b14d32 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 01:15:36 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stdlib/concurrent/futures/_base.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdlib/concurrent/futures/_base.pyi b/stdlib/concurrent/futures/_base.pyi index 56a25f518d5f..bdfdb28762fe 100644 --- a/stdlib/concurrent/futures/_base.pyi +++ b/stdlib/concurrent/futures/_base.pyi @@ -64,7 +64,12 @@ class Executor: 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 + self, + fn: Callable[..., _T], + *iterables: Iterable[Any], + timeout: float | None = None, + chunksize: int = 1, + buffersize: int | None = None, ) -> Iterator[_T]: ... else: def map(