gh-93250: [Enum] Change IntEnum boundary to KEEP for backwards compatibility (GH-93302)

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.
This commit is contained in:
Ethan Furman 2022-05-27 15:14:28 -07:00 committed by GitHub
parent 711eda7dec
commit 70cfe56caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -1572,7 +1572,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
"""