Repository navigation
[Enum] update __contains__ to return True for valid values #88123
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
In 3.12
__contains__will check for both members and values:Color.RED in Color --> True 1 in Color --> True 'RED' in Color --> FalseAdd DeprecationWarning for now.
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.10 (EOL)end of lifeend of life
on Apr 27, 2021 - addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Apr 27, 2021 Ethan can we close this issue?
@ethanfurman
__contains__should be updated before Python 3.12 is released.
I add this issue as a release blocker since tests are broken.
cc @pablogsal1 remaining item
- added3.12only security fixesonly security fixesand removed3.10 (EOL)end of lifeend of life
on May 17, 2022 I have attempted to implement the new behaviour here #93298
- added a commit that references this issue
on Jun 26, 2022 - added a commit that references this issue
on May 31, 2024
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixesrelease-blockertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
TypeErrorfrom containment checks #25670Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: