merge pickle stubs into 2and3 (#1328)

Followup from #1321
This commit is contained in:
Jelle Zijlstra
2017-05-24 14:57:58 -07:00
committed by Guido van Rossum
parent 6fe7cdb1c3
commit d9bf214203
3 changed files with 140 additions and 177 deletions

View File

@@ -1,38 +0,0 @@
# Stubs for pickle (Python 2)
from typing import Any, IO
HIGHEST_PROTOCOL = ... # type: int
def dump(obj: Any, file: IO[bytes], protocol: int = None) -> None: ...
def dumps(obj: Any, protocol: int = ...) -> bytes: ...
def load(file: IO[bytes]) -> Any: ...
def loads(string: bytes) -> Any: ...
class PickleError(Exception):
pass
class PicklingError(PickleError):
pass
class UnpicklingError(PickleError):
pass
class Pickler:
def __init__(self, file: IO[bytes], protocol: int = None) -> None: ...
def dump(self, obj: Any) -> None: ...
def clear_memo(self) -> None: ...
class Unpickler:
def __init__(self, file: IO[bytes]) -> None: ...
def load(self) -> Any: ...