pickle: improve positional-arg accuracy in py39 and others (#4273)

Although technically data in loads is not positional-only in py38, but
we decided that that doesn't matter

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-06-26 03:29:47 -07:00
committed by GitHub
parent 92fa4e799c
commit 1c3f526fbf
2 changed files with 3 additions and 4 deletions

View File

@@ -32,7 +32,7 @@ if sys.version_info >= (3, 8):
errors: str = ..., buffers: Optional[Iterable[Any]] = ...
) -> Any: ...
def loads(
data: bytes, *, fix_imports: bool = ..., encoding: str = ...,
__data: bytes, *, fix_imports: bool = ..., encoding: str = ...,
errors: str = ..., buffers: Optional[Iterable[Any]] = ...
) -> Any: ...
elif sys.version_info >= (3, 0):
@@ -79,7 +79,7 @@ class Pickler:
else:
def __init__(self, file: IO[bytes], protocol: Optional[int] = ...) -> None: ...
def dump(self, obj: Any) -> None: ...
def dump(self, __obj: Any) -> None: ...
def clear_memo(self) -> None: ...
def persistent_id(self, obj: Any) -> Any: ...
@@ -95,7 +95,7 @@ class Unpickler:
def __init__(self, file: IO[bytes]) -> None: ...
def load(self) -> Any: ...
def find_class(self, module: str, name: str) -> Any: ...
def find_class(self, __module_name: str, __global_name: str) -> Any: ...
if sys.version_info >= (3, 0):
def persistent_load(self, pid: Any) -> Any: ...

View File

@@ -338,7 +338,6 @@ os._Environ.__init__
os._Environ.setdefault
os._wrap_close.__init__
pickle.Pickler.persistent_id
pickle.Unpickler.find_class
pickle.Unpickler.persistent_load
pipes.Template.copy
pkgutil.ImpImporter.__init__