From bc463a06777370e0876a9d7753ea37dc507d59e2 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 1 Feb 2023 14:43:50 -0800 Subject: [PATCH] Remove default for `size` parameter to `multiprocessing.heap.Heap` (#9658) It's system-dependent. stubdefaulter told me `multiprocessing.heap.Heap: parameter size: stub default 4096 != runtime default 16384`, which presumably means it's 4096 on @AlexWaygood's system and 16384 on mine. I looked in the code and the default is set to `mmap.PAGESIZE`, which in turn is set from some system call at import time. --- stdlib/multiprocessing/heap.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/multiprocessing/heap.pyi b/stdlib/multiprocessing/heap.pyi index 114bdf0d4..b5e2ced5e 100644 --- a/stdlib/multiprocessing/heap.pyi +++ b/stdlib/multiprocessing/heap.pyi @@ -27,7 +27,7 @@ if sys.platform != "win32": def rebuild_arena(size: int, dupfd: _SupportsDetach) -> Arena: ... class Heap: - def __init__(self, size: int = 4096) -> None: ... + def __init__(self, size: int = ...) -> None: ... def free(self, block: _Block) -> None: ... def malloc(self, size: int) -> _Block: ...