Skip to content

Commit a30db1c

Browse files
[stdlib] Add missing pickle methods in multiprocessing.queues
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
1 parent da3de3a commit a30db1c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/multiprocessing/queues.pyi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class Queue(Generic[_T]):
1010
# FIXME: `ctx` is a circular dependency and it's not actually optional.
1111
# It's marked as such to be able to use the generic Queue in __init__.pyi.
1212
def __init__(self, maxsize: int = 0, *, ctx: Any = ...) -> None: ...
13+
def __getstate__(self) -> object: ...
14+
def __setstate__(self, state: object) -> None: ...
1315
def put(self, obj: _T, block: bool = True, timeout: float | None = None) -> None: ...
1416
def get(self, block: bool = True, timeout: float | None = None) -> _T: ...
1517
def qsize(self) -> int: ...
@@ -31,6 +33,8 @@ class SimpleQueue(Generic[_T]):
3133
def __init__(self, *, ctx: Any = ...) -> None: ...
3234
def close(self) -> None: ...
3335
def empty(self) -> bool: ...
36+
def __getstate__(self) -> object: ...
37+
def __setstate__(self, state: object) -> None: ...
3438
def get(self) -> _T: ...
3539
def put(self, obj: _T) -> None: ...
3640
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...

0 commit comments

Comments
 (0)