]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131045: [Enum] fix flag containment checks when using values (GH-131053)
authorEthan Furman <ethan@stoneleaf.us>
Wed, 12 Mar 2025 19:10:47 +0000 (12:10 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Mar 2025 19:10:47 +0000 (12:10 -0700)
commit17d06aeb5476099bc1acd89cd6f69e239e0f9350
treee5fe6c629cf3c38fc0370e3bb5e7ad98c3948d87
parentdb6a998b18e9476226507144b3b2fab854095dbc
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: Tomas R. <tomas.roun8@gmail.com>
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2025-03-10-12-26-56.gh-issue-131045.s1TssJ.rst [new file with mode: 0644]