Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix object.__reduce__ #6662

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@ class object:
def __getattribute__(self, __name: str) -> Any: ...
def __delattr__(self, __name: str) -> None: ...
def __sizeof__(self) -> int: ...
def __reduce__(self) -> str | Tuple[object, ...]: ...
# return type of pickle methods is rather hard to express in the current type system
# see #6661 and https://docs.python.org/3/library/pickle.html#object.__reduce__
def __reduce__(self) -> str | Tuple[Any, ...]: ...
if sys.version_info >= (3, 8):
def __reduce_ex__(self, __protocol: SupportsIndex) -> str | Tuple[object, ...]: ...
def __reduce_ex__(self, __protocol: SupportsIndex) -> str | Tuple[Any, ...]: ...
else:
def __reduce_ex__(self, __protocol: int) -> str | Tuple[object, ...]: ...
def __reduce_ex__(self, __protocol: int) -> str | Tuple[Any, ...]: ...
def __dir__(self) -> Iterable[str]: ...
def __init_subclass__(cls) -> None: ...

Expand Down