]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-99248: [Enum] fix negative number infinite loop (GH-99256)
authorEthan Furman <ethan@stoneleaf.us>
Tue, 8 Nov 2022 20:00:19 +0000 (12:00 -0800)
committerGitHub <noreply@github.com>
Tue, 8 Nov 2022 20:00:19 +0000 (12:00 -0800)
commit0b4ffb08ccdc21fc07ce90d3f78b58a25e1af653
treea8a7341c62dfd4a6c800f4ea411e762aa5604882
parent52f91c642b72003c57fc1fb855beab6dfab155b7
gh-99248: [Enum] fix negative number infinite loop (GH-99256)

[Enum] fix negative number infinite loop

- _iter_bits_lsb() now raises a ValueError if a negative number
  is passed in

- verify() now skips checking negative numbers for named flags
Lib/enum.py
Lib/test/test_enum.py
Misc/NEWS.d/next/Library/2022-11-08-11-15-37.gh-issue-99248.1vt8xI.rst [new file with mode: 0644]