summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2021-10-20 16:11:47 -0700
committerGitHub <noreply@github.com>2021-10-20 16:11:47 -0700
commit9733c9651afad84ab2f010e9e68b7c03976ea9f3 (patch)
tree62943fa788ac4a0d09983d82f63862d597941177
parentd33fae7105aaea7c376b5455fd1f8de802ca2542 (diff)
downloadcpython-git-9733c9651afad84ab2f010e9e68b7c03976ea9f3.tar.gz
[3.9] bpo-42517: [ENUM] update docs for changes coming in 3.11 (GH-29113)
-rw-r--r--Doc/library/enum.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index bbe8bdc82b..0b8ddc091f 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -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
@@ -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
@@ -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>``.