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

[Enum] make some private attributes public #112328

Closed
ethanfurman opened this issue Nov 23, 2023 · 4 comments · Fixed by #121720
Closed

[Enum] make some private attributes public #112328

ethanfurman opened this issue Nov 23, 2023 · 4 comments · Fixed by #121720
Assignees
Labels
3.13 bugs and security fixes deferred-blocker docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@ethanfurman
Copy link
Member

ethanfurman commented Nov 23, 2023

Feature or enhancement

Make _EnumDict, _EnumDict._member_names, and possibly other private names public.

This is to make subclassing EnumType and other advanced behavior supported, such as having multiple values per member.

Linked PRs

@ethanfurman ethanfurman added type-feature A feature request or enhancement stdlib Python modules in the Lib dir 3.13 bugs and security fixes labels Nov 23, 2023
@ethanfurman ethanfurman self-assigned this Nov 23, 2023
@ethanfurman ethanfurman added the docs Documentation in the Doc dir label Nov 23, 2023
ethanfurman added a commit that referenced this issue Dec 5, 2023
* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
@hugovk
Copy link
Member

hugovk commented Dec 11, 2023

The PR has been merged, shall we close this, or is there more to do?

@ethanfurman
Copy link
Member Author

Closing, thanks for the reminder.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…H-112514)

* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
@JelleZijlstra
Copy link
Member

EnumDict is now public and included in Enum.__all__, but it is not documented at https://docs.python.org/3.13/library/enum.html or mentioned in the What's New for 3.13.

@u2rafi
Copy link
Contributor

u2rafi commented Jul 13, 2024

I am working on documenting this.

Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…H-112514)

* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Nikita Sobolev <[email protected]>
ethanfurman added a commit that referenced this issue Dec 19, 2024
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
ethanfurman added a commit that referenced this issue Dec 20, 2024
Co-authored-by: Rafi <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Dec 23, 2024
…H-121720)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Dec 23, 2024
…honGH-123669)

Co-authored-by: Rafi <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
…H-121720)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
…honGH-123669)

Co-authored-by: Rafi <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Ethan Furman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes deferred-blocker docs Documentation in the Doc dir stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
Development

Successfully merging a pull request may close this issue.

4 participants