Skip to content

bpo-31947: names=None case is not handled by EnumMeta._create_ method #4288

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

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

anentropic
Copy link
Contributor

@anentropic anentropic commented Nov 5, 2017

It seems to me that this method should not have names=None default value in signature, because that case is not handled, nor is it described as a possible value in the docstring.

Seems like maybe a copy and paste from __call__, which has basically same signature, but names=None is valid and handled there.

Or I humbly admit maybe there's something more going on that I'm not aware of. Anyway, I propose this small change.

https://bugs.python.org/issue31947

It seems to me that this method should not have `names=None` default value in signature, because that case is not handled, nor is it described as a possible value in the docstring.

Seems like maybe a copy and paste from `__call__`, which has basically same signature, but `names=None` is valid and handled there.

Or I humbly admit maybe there's something more going on that I'm not aware of. Anyway, I propose this small change.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@anentropic anentropic changed the title names=None case is not handled by EnumMeta._create_ method names=None case is not handled by EnumMeta._create_ method bpo-31947 Nov 5, 2017
@anentropic
Copy link
Contributor Author

anentropic commented Nov 5, 2017

I have signed the CLA now

@serhiy-storchaka serhiy-storchaka changed the title names=None case is not handled by EnumMeta._create_ method bpo-31947 bpo-31947: names=None case is not handled by EnumMeta._create_ method Mar 26, 2018
@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels Mar 26, 2018
@ethanfurman ethanfurman self-assigned this Mar 26, 2018
Copy link
Member

@ethanfurman ethanfurman left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for finding and fixing that!

@ned-deily
Copy link
Member

@anentropic, sorry your CLA status did not get updated properly on our end. So now, I think the only holdup is a NEWS entry unless @ethanfurman thinks it does not need one.

@ethanfurman
Copy link
Member

Attempting to figure out how to add a news entry...

@ethanfurman ethanfurman merged commit b8e21f1 into python:master Apr 16, 2018
@miss-islington
Copy link
Contributor

Thanks @anentropic for the PR, and @ethanfurman for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-6484 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 16, 2018
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 16, 2018
@bedevere-bot
Copy link

GH-6485 is a backport of this pull request to the 3.6 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants