Skip to content

bpo-34282: Fix Enum._convert shadowing members named _convert#8568

Merged
ethanfurman merged 10 commits into
python:masterfrom
orlnub123:enum-convert
Sep 12, 2018
Merged

bpo-34282: Fix Enum._convert shadowing members named _convert#8568
ethanfurman merged 10 commits into
python:masterfrom
orlnub123:enum-convert

Conversation

@orlnub123

@orlnub123 orlnub123 commented Jul 30, 2018

Copy link
Copy Markdown
Contributor

I've combined the third solution with the second from the issue below, circumventing its problem.

https://bugs.python.org/issue34282

@orlnub123

Copy link
Copy Markdown
Contributor Author

Is a news entry needed?

@orlnub123 orlnub123 changed the title bpo-34282: Fix Enum._convert bpo-34282: Fix Enum._convert shadowing members named _convert Jul 31, 2018
@ethanfurman ethanfurman self-assigned this Aug 6, 2018
@orlnub123

Copy link
Copy Markdown
Contributor Author

I've gone ahead and added a news entry.

Comment thread Lib/enum.py Outdated

return enum_class

def _convert(cls, name, module, filter, source=None):

Copy link
Copy Markdown
Member

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!

Copy link
Copy Markdown
Contributor Author

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.

@bedevere-bot

Copy link
Copy Markdown

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@orlnub123

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@ethanfurman: please review the changes made to this pull request.

@orlnub123

Copy link
Copy Markdown
Contributor Author

I've merged the changes from #9034.

@ethanfurman ethanfurman left a comment

Copy link
Copy Markdown
Member

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. :)

@bedevere-bot

Copy link
Copy Markdown

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. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@orlnub123

Copy link
Copy Markdown
Contributor Author

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.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@ethanfurman: please review the changes made to this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants