Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bump enum to 3.14 #14021

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

Merged
merged 5 commits into from
May 24, 2025
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions 3 stdlib/@tests/stubtest_allowlists/py314.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ ctypes.wintypes.HDROP
ctypes.wintypes.HFILE
ctypes.wintypes.HRESULT
ctypes.wintypes.HSZ
enum.Enum.__signature__
enum.EnumMeta.__signature__
enum.EnumType.__signature__
faulthandler.dump_c_stack
fractions.Fraction.__pow__
fractions.Fraction.__rpow__
Expand Down
6 changes: 5 additions & 1 deletion 6 stdlib/enum.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ _EnumerationT = TypeVar("_EnumerationT", bound=type[Enum])
# >>> Enum('Foo', names={'RED': 1, 'YELLOW': 2})
# <enum 'Foo'>
_EnumNames: TypeAlias = str | Iterable[str] | Iterable[Iterable[str | Any]] | Mapping[str, Any]
_Signature: TypeAlias = Any # TODO: Unable to import Signature from inspect module

if sys.version_info >= (3, 11):
class nonmember(Generic[_EnumMemberT]):
Expand Down Expand Up @@ -166,6 +167,9 @@ class EnumMeta(type):
if sys.version_info >= (3, 12):
@overload
def __call__(cls: type[_EnumMemberT], value: Any, *values: Any) -> _EnumMemberT: ...
if sys.version_info >= (3, 14):
@property
def __signature__(cls) -> _Signature: ...

_member_names_: list[str] # undocumented
_member_map_: dict[str, Enum] # undocumented
Expand Down Expand Up @@ -212,7 +216,7 @@ class Enum(metaclass=EnumMeta):
if sys.version_info >= (3, 11):
def __copy__(self) -> Self: ...
def __deepcopy__(self, memo: Any) -> Self: ...
if sys.version_info >= (3, 12):
if sys.version_info >= (3, 12) and sys.version_info < (3, 14):
@classmethod
def __signature__(cls) -> str: ...

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.