summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-27 22:43:13 (GMT)
committerGitHub <noreply@github.com>2022-05-27 22:43:13 (GMT)
commit647426d4fa272da33269a9c183f3949a3477202d (patch)
treeaf541096833aeed5600b3ff9ca4449bd9102b853 /Lib/enum.py
parent3f7abff97bf6472f35d23a00656e88d77c93feea (diff)
downloadcpython-647426d4fa272da33269a9c183f3949a3477202d.zip
cpython-647426d4fa272da33269a9c183f3949a3477202d.tar.gz
cpython-647426d4fa272da33269a9c183f3949a3477202d.tar.bz2
gh-93250: [Enum] Change IntEnum boundary to KEEP for backwards compatibility (GH-93302) (GH-93304)
In previous versions of Python if an IntEnum member was combined with another integer type value using a bit-wise operation, the resulting value would still be the IntEnum type. This change restores that behavior. (cherry picked from commit 70cfe56cafb2b549983f63d5d1a54654fe63c15c) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 4a21226..fe521b1 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1575,7 +1575,7 @@ class Flag(Enum, boundary=STRICT):
__rxor__ = __xor__
-class IntFlag(int, ReprEnum, Flag, boundary=EJECT):
+class IntFlag(int, ReprEnum, Flag, boundary=KEEP):
"""
Support for integer-based Flags
"""