]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100098: [Enum] insist on actual tuples, no subclasses, for auto (GH-100099)
authorEthan Furman <ethan@stoneleaf.us>
Thu, 8 Dec 2022 06:58:08 +0000 (22:58 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Dec 2022 06:58:08 +0000 (22:58 -0800)
commitded02ca54d7bfa32c8eab0871d56e4547cd356eb
tree3f4b0be649ed020c55b47a9dd5e7204fa12820b9
parentcce836296016463032495c6ca739ab469ed13d3c
gh-100098: [Enum] insist on actual tuples, no subclasses, for auto (GH-100099)

When checking for auto() instances, only top-level usage is supported,
which means either alone or as part of a regular tuple. Other
containers, such as lists, dicts, or namedtuples, will not have auto()
transformed into a value.
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2022-12-08-06-18-06.gh-issue-100098.uBvPlp.rst [new file with mode: 0644]