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-117663: [Enum] fix _simple_enum's detection of aliases #117664

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

ethanfurman
Copy link
Member

@ethanfurman ethanfurman commented Apr 9, 2024

Fix _simple_enum to detect aliases when multiple arguments are present but only one is the member value.

@ethanfurman ethanfurman added type-bug An unexpected behavior, bug, or error stdlib Python modules in the Lib dir 3.13 bugs and security fixes labels Apr 9, 2024
@ethanfurman ethanfurman self-assigned this Apr 9, 2024
@@ -26,7 +26,6 @@ class HTTPStatus:
def __new__(cls, value, phrase, description=''):
obj = int.__new__(cls, value)
obj._value_ = value

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whitespace change can probably be omitted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, but the blank line irritates me. :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm nitpicking, but that means you're making a change to HTTPStatus while this PR is not about HTTPStatus but about Enums. It's a whitespace change, but still.. I've made it now part of my PR https://github.com/python/cpython/pull/117611/files which already changes the file Lib/http/__init__.py -- so you can drop it from this PR if you want.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. Change removed.

@ethanfurman ethanfurman merged commit e5521bc into python:main Apr 9, 2024
33 checks passed
@ethanfurman ethanfurman added 3.12 only security fixes needs backport to 3.12 only security fixes labels Apr 9, 2024
@miss-islington-app
Copy link

Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Sorry, @ethanfurman, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e5521bcca916c63866f0aa1c4dfb3a315d6ada73 3.12

@hugovk hugovk removed 3.12 only security fixes 3.13 bugs and security fixes needs backport to 3.12 only security fixes labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants