mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
add missing protocol version 5 in pickle (#5801)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user