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

[3.12] gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist (GH-106468) #106620

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jul 11, 2023

For example:

class Flag(enum.Flag):
    A = 0x01
    B = 0x02
    MASK = 0xff

~Flag.MASK is Flag(0)

(cherry picked from commit 95b7426)

Co-authored-by: Ethan Furman ethan@stoneleaf.us

…ist (pythonGH-106468)

For example:

    class Flag(enum.Flag):
        A = 0x01
        B = 0x02
        MASK = 0xff

    ~Flag.MASK is Flag(0)
(cherry picked from commit 95b7426)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Jul 11, 2023
@Yhg1s Yhg1s merged commit 6968f9e into python:3.12 Jul 11, 2023
19 checks passed
@miss-islington miss-islington deleted the backport-95b7426-3.12 branch July 11, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants