From a56a10bdb2d1cb30d0ea0fb459f3169de5dfedfc Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 20 Oct 2021 13:19:51 -0700 Subject: [PATCH 1/2] [ENUM] update docs for changes coming in 3.11 --- Doc/library/enum.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index bbe8bdc82b4091..9ffd1e8b9e9c97 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 + .. 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 ````. From 716e3fc2bf6b07b07fed853cd85a20efdeea0094 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 20 Oct 2021 15:44:18 -0700 Subject: [PATCH 2/2] fix markup --- Doc/library/enum.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 9ffd1e8b9e9c97..0b8ddc091fe154 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -1204,7 +1204,7 @@ all named flags and all named combinations of flags that are in the value:: >>> Color(7) # not named combination - .. note:: +.. 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