]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 5 Jul 2023 11:59:18 +0000 (04:59 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Jul 2023 11:59:18 +0000 (13:59 +0200)
commit3f244b2f6e355a15658a7b58792819b4143be0d9
tree975062ef719b8aa9cb033c9ef9ef1a1295333736
parentddfe8eb45f23885af0b89901df6907172a37f7f4
[3.11] gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542) (#105571)

When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
(cherry picked from commit 59f009e5898a006cdc8f5249be589de6edfe5cd0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2023-06-08-17-49-46.gh-issue-105497.K6Q8nU.rst [new file with mode: 0644]