From b4ad21475411ae3cbbc7f163ebeeac5fee4adf97 Mon Sep 17 00:00:00 2001 From: Christian Bundy <537700+christianbundy@users.noreply.github.com> Date: Thu, 27 Apr 2023 05:05:54 -0700 Subject: [PATCH] Add `object.__getstate__()` in Python 3.11+ (#10091) --- stdlib/builtins.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index d49610b25..6bc9c7ec8 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -108,6 +108,8 @@ class object: def __reduce_ex__(self, __protocol: SupportsIndex) -> str | tuple[Any, ...]: ... else: def __reduce_ex__(self, __protocol: int) -> str | tuple[Any, ...]: ... + if sys.version_info >= (3, 11): + def __getstate__(self) -> object: ... def __dir__(self) -> Iterable[str]: ... def __init_subclass__(cls) -> None: ...