Fix stubtest for py312b3 (#10343)

This commit is contained in:
Alex Waygood
2023-06-21 15:46:50 +01:00
committed by GitHub
parent f3a0be32fe
commit 4a692fc546
2 changed files with 8 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import types
from _typeshed import SupportsKeysAndGetItem, Unused
from abc import ABCMeta
from builtins import property as _builtins_property
from collections.abc import Iterable, Iterator, Mapping
from collections.abc import Callable, Iterable, Iterator, Mapping
from typing import Any, Generic, TypeVar, overload
from typing_extensions import Literal, Self, TypeAlias
@@ -34,6 +34,9 @@ if sys.version_info >= (3, 11):
"verify",
]
if sys.version_info >= (3, 12):
__all__ += ["pickle_by_enum_name", "pickle_by_global_name"]
_EnumMemberT = TypeVar("_EnumMemberT")
_EnumerationT = TypeVar("_EnumerationT", bound=type[Enum])
@@ -289,3 +292,7 @@ class auto(IntFlag):
@_magic_enum_attr
def value(self) -> Any: ...
def __new__(cls) -> Self: ...
if sys.version_info >= (3, 12):
def pickle_by_global_name(self: Enum, proto: int) -> str: ...
def pickle_by_enum_name(self: _EnumMemberT, proto: int) -> tuple[Callable[..., Any], tuple[type[_EnumMemberT], str]]: ...