]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-131045: [Enum] fix flag containment checks when using values (GH-131053...
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>
Mon, 24 Mar 2025 09:31:24 +0000 (10:31 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Mar 2025 09:31:24 +0000 (10:31 +0100)
commit8a9aee71268c77867d3cc96d43cbbdcbe8c0e1e8
tree041e4604a4c77ba0c5ff805c5fb1965b6854753b
parent7f2de07808b13bd345855fec42ac6add2cfb3704
[3.12] gh-131045: [Enum] fix flag containment checks when using values (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>
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]