Skip to content

Commit 9733c96

Browse files
authored
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113)
1 parent d33fae7 commit 9733c96

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Doc/library/enum.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,9 +1125,9 @@ and raise an error if the two do not match::
11251125
_Private__names
11261126
"""""""""""""""
11271127

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

11321132

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

1153+
.. note::
1154+
1155+
This behavior is deprecated and will be removed in 3.11.
1156+
11531157
.. versionchanged:: 3.5
11541158

11551159

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

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

0 commit comments

Comments
 (0)