-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-34282: Fix Enum._convert shadowing members named _convert #8568
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
Conversation
Is a news entry needed? |
I've gone ahead and added a news entry. |
Lib/enum.py
Outdated
@@ -424,6 +424,39 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s | |||
|
|||
return enum_class | |||
|
|||
def _convert(cls, name, module, filter, source=None): |
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.
See notes in bpo issue. Thanks for your help in this!
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.
Glad to help! I've got some questions about them in the issue.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
I've merged the changes from #9034. |
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.
Looks good! We just need one more test that verifies that usage of '_convert' in 3.8 raises a warning, and in 3.9+ raises an AttributeError.
Oh, and make sure you are in the contributors file. :)
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Thanks for the offer, I really appreciate it. I hope I've added myself to the right place! I have made the requested changes; please review again. |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
I've combined the third solution with the second from the issue below, circumventing its problem.
https://bugs.python.org/issue34282