add missing protocol version 5 in pickle (#5801)

This commit is contained in:
Anton Grübel
2021-07-24 22:42:11 +02:00
committed by GitHub
parent a6a744a9d0
commit 7c5d76aca0

View File

@@ -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