-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
Conversation
Lib/http/__init__.py
Outdated
@@ -26,7 +26,6 @@ class HTTPStatus: | |||
def __new__(cls, value, phrase, description=''): | |||
obj = int.__new__(cls, value) | |||
obj._value_ = value | |||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. Change removed.
Thanks @ethanfurman for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, @ethanfurman, I could not cleanly backport this to
|
Fix
_simple_enum
to detect aliases when multiple arguments are present but only one is the member value.