-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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-131045: [Enum] fix flag containment checks when using values #131053
Conversation
Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first.
Misc/NEWS.d/next/Library/2025-03-10-12-26-56.gh-issue-131045.s1TssJ.rst
Outdated
Show resolved
Hide resolved
spelling and mark-up fixes Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
(We generally reserve those labels to issues) |
Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…pythonGH-131053) Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first. (cherry picked from commit 17d06ae) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Sorry, @ethanfurman, I could not cleanly backport this to
|
GH-131167 is a backport of this pull request to the 3.13 branch. |
The 3.12 bp failed, do you want someone else to make it or are you planning to do it? @ethanfurman |
GH-131232 is a backport of this pull request to the 3.12 branch. |
…pythonGH-131053) Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first. Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
GH-131053) (#131167) gh-131045: [Enum] fix flag containment checks when using values (GH-131053) Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first. (cherry picked from commit 17d06ae) Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
GH-131053) (#131232) * gh-131045: [Enum] fix flag containment checks when using values (GH-131053) Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first. --------- Co-authored-by: Ethan Furman <ethan@stoneleaf.us> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Check would fail if value would create a pseudo-member, but that member had not yet been created. We now attempt to create a pseudo-member for a passed-in value first.
enum.Flag.__contains__
changed behavior since python 3.12 #131045