Skip to content

[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 #29113

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 2 commits into from
Oct 20, 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
13 changes: 11 additions & 2 deletions Doc/library/enum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,9 @@ and raise an error if the two do not match::
_Private__names
"""""""""""""""

Private names will be normal attributes in Python 3.10 instead of either an error
Private names will be normal attributes in Python 3.11 instead of either an error
or a member (depending on if the name ends with an underscore). Using these names
in 3.9 will issue a :exc:`DeprecationWarning`.
in 3.9 and 3.10 will issue a :exc:`DeprecationWarning`.


``Enum`` member type
Expand All @@ -1150,6 +1150,10 @@ all-uppercase names for members)::
>>> FieldTypes.size.value
2

.. note::

This behavior is deprecated and will be removed in 3.11.

.. versionchanged:: 3.5


Expand Down Expand Up @@ -1200,3 +1204,8 @@ all named flags and all named combinations of flags that are in the value::
>>> Color(7) # not named combination
<Color.CYAN|MAGENTA|BLUE|YELLOW|GREEN|RED: 7>

.. note::

In 3.11 unnamed combinations of flags will only produce the canonical flag
members (aka single-value flags). So ``Color(7)`` would produce something
like ``<Color.BLUE|GREEN|RED: 7>``.