Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-99248: [Enum] fix negative number infinite loop #99256

Merged
merged 2 commits into from Nov 8, 2022

Conversation

ethanfurman
Copy link
Member

@ethanfurman ethanfurman commented Nov 8, 2022

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

  • verify() now skips checking negative numbers for named flags

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

- verify() now skips checking negative numbers for named flags
@ethanfurman ethanfurman merged commit 0b4ffb0 into python:main Nov 8, 2022
15 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Nov 8, 2022

Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 8, 2022
)

[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
(cherry picked from commit 0b4ffb0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@bedevere-bot
Copy link

bedevere-bot commented Nov 8, 2022

GH-99259 is a backport of this pull request to the 3.11 branch.

miss-islington added a commit that referenced this pull request Nov 8, 2022
[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
(cherry picked from commit 0b4ffb0)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
@ethanfurman ethanfurman deleted the enum-negative_verify branch Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 3.12 stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants