]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100098: [Enum] insist on actual tuples, no subclasses, for auto (GH-100099)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 8 Dec 2022 07:21:29 +0000 (23:21 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Dec 2022 07:21:29 +0000 (23:21 -0800)
commitd4426c829565e3ef922c091ee9bd48bc556f2550
treedb55eedff5f38c254f7a6caedb3de829ae1d0971
parent846898e5ab0fb1bf740263573f01669be186645f
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.
(cherry picked from commit ded02ca54d7bfa32c8eab0871d56e4547cd356eb)

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