Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-105497: [Enum] Fix flag inversion when alias/mask members exist. #105542

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

ethanfurman
Copy link
Member

@ethanfurman ethanfurman commented Jun 9, 2023

@ethanfurman ethanfurman added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir 3.11 only security fixes 3.12 bugs and security fixes needs backport to 3.11 only security fixes 3.13 bugs and security fixes needs backport to 3.12 bug and security fixes labels Jun 9, 2023
@ethanfurman ethanfurman self-assigned this Jun 9, 2023
@ethanfurman ethanfurman merged commit 59f009e into python:main Jun 9, 2023
@miss-islington
Copy link
Contributor

Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @ethanfurman, I had trouble checking out the 3.12 backport branch.
Please retry by removing and re-adding the "needs backport to 3.12" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 59f009e5898a006cdc8f5249be589de6edfe5cd0 3.12

@bedevere-bot
Copy link

GH-105571 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 9, 2023
@ethanfurman ethanfurman added needs backport to 3.12 bug and security fixes and removed needs backport to 3.12 bug and security fixes labels Jun 9, 2023
@miss-islington
Copy link
Contributor

Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2023
…ist. (pythonGH-105542)

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 59f009e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@bedevere-bot
Copy link

GH-105572 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jun 9, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 9, 2023
…ist. (pythonGH-105542)

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 59f009e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@ethanfurman ethanfurman deleted the enum-flag_conform branch June 9, 2023 16:03
ambv pushed a commit that referenced this pull request Jul 5, 2023
…xist. (GH-105542) (#105572)

gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542)

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 59f009e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
ambv pushed a commit that referenced this pull request Jul 5, 2023
…xist. (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 59f009e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@Eclips4 Eclips4 mentioned this pull request Aug 1, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 bugs and security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants