From 7c5d76aca048b0b8114ca4446655307b42ca1fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Gr=C3=BCbel?= Date: Sat, 24 Jul 2021 22:42:11 +0200 Subject: [PATCH] add missing protocol version 5 in pickle (#5801) --- stdlib/pickle.pyi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stdlib/pickle.pyi b/stdlib/pickle.pyi index e9dc2c689..4183a0194 100644 --- a/stdlib/pickle.pyi +++ b/stdlib/pickle.pyi @@ -58,6 +58,7 @@ _reducedtype = Union[ class Pickler: fast: bool dispatch_table: Mapping[type, Callable[[Any], _reducedtype]] + bin: bool # undocumented dispatch: ClassVar[dict[type, Callable[[Unpickler, Any], None]]] # undocumented, _Pickler only if sys.version_info >= (3, 8): @@ -170,6 +171,12 @@ STACK_GLOBAL: bytes MEMOIZE: bytes FRAME: bytes +if sys.version_info >= (3, 8): + # Protocol 5 + BYTEARRAY8: bytes + NEXT_BUFFER: bytes + READONLY_BUFFER: bytes + def encode_long(x: int) -> bytes: ... # undocumented def decode_long(data: bytes) -> int: ... # undocumented