]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-131045: [Enum] fix flag containment checks when using values (GH-131053...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 23 Mar 2025 16:51:26 +0000 (17:51 +0100)
committerGitHub <noreply@github.com>
Sun, 23 Mar 2025 16:51:26 +0000 (17:51 +0100)
commitb3dccc0ce2f53936fdae50498388679f2a408b3f
tree37ec1fd00d8292ede22d5bdb23563a1c4f6d8bb4
parentf577a43b8d4576d03fb065f64a40535440c8ed08
[3.13] gh-131045: [Enum] fix flag containment checks when using values (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 17d06aeb5476099bc1acd89cd6f69e239e0f9350)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
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]