[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-03-08 Thread miss-islington
miss-islington added the comment: New changeset 8755f0aeb67125a154e5665a24276fe85d269d85 by Miss Islington (bot) in branch '3.7': bpo-35899: Fix Enum handling of empty and weird strings (GH-11891) https://github.com/python/cpython/commit/8755f0aeb67125a154e5665a24276fe85d269d85 --

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-03-03 Thread Ethan Furman
Ethan Furman added the comment: Thank you, everyone! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-03-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +12151 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-03-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +12150 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-03-03 Thread miss-islington
miss-islington added the comment: New changeset 8b914d2767acba3a9e78f1dacdc2d61dbfd7e304 by Miss Islington (bot) (Brennan D Baraban) in branch 'master': bpo-35899: Fix Enum handling of empty and weird strings (GH-11891)

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-21 Thread Ethan Furman
Ethan Furman added the comment: The changes to `_is_sunder` and `_is_dunder` look good, but there is a problem with the underlying assumptions of what Enum should be doing: - nameless members are not to be allowed - non-alphanumeric characters are not supported In other words, while

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-18 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thank you for your contribution. Have a nice day, -- ___ Python tracker ___ ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-15 Thread Brennan D Baraban
Change by Brennan D Baraban <3...@holbertonschool.com>: -- keywords: +patch pull_requests: +11919 stage: needs patch -> patch review ___ Python tracker ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-15 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Yes, I will submit a new PR today. -- ___ Python tracker ___ ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-15 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Brennan, Normally, you wanted to work on this issue and you have waited for one week after the last message of Maxwell. Do you want to work on this issue and submit your PR? Have a nice day, Stéphane -- ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Thank you, Stéphane. I submitted a change request to your PR just now. -- ___ Python tracker ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Cheryl Sabella
Change by Cheryl Sabella : -- Removed message: https://bugs.python.org/msg335483 ___ Python tracker ___ ___ Python-bugs-list

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Cheryl Sabella
Cheryl Sabella added the comment: I found this issue that Serhiy did on the devguide where he added {} around the placeholder: https://github.com/python/devguide/pull/444 I think that might be the correct way to do it. -- ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi, I have created the PR for Maxwell. After tomorrow, if we have no news from him, I propose to you to update/comment the PR. Of course, I will add a co-authored-by field in the commit. -- keywords: -patch nosy: +matrixise stage: patch review ->

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-13 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +11870 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Brennan D Baraban
Brennan D Baraban <3...@holbertonschool.com> added the comment: Got it, makes sense. Thank you. New contributor here :) -- ___ Python tracker ___

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Ethan Furman
Ethan Furman added the comment: Let's give Maxwell until the 14th (so a week from when I asked him to turn his code into a patch) and if nothing from him by then you are welcome to take it over. -- ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-10 Thread Brennan
Brennan <3...@holbertonschool.com> added the comment: I'm not sure if Maxwell is still working on this issue, but may I pick it up? I can submit a PR within the day. -- nosy: +bdbaraban ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-07 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-07 Thread Ethan Furman
Ethan Furman added the comment: Yes, the first solution will be fine. Maxwell, can you create a github pull request with that? -- keywords: +easy stage: -> needs patch type: crash -> behavior ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-06 Thread Cheryl Sabella
Cheryl Sabella added the comment: I agree with Rémi Lapeyre. For reference, the len() check and current tests were added under issue 19156. -- nosy: +cheryl.sabella ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-05 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-05 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +barry, eli.bendersky, ethan.furman ___ Python tracker ___ ___ Python-bugs-list

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi @Maxpxt, I think your first solution is appropriate, do you want to open a new pull request with your solution and an appropriate test case? -- nosy: +remi.lapeyre ___ Python tracker

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-05 Thread Maxwell
Maxwell added the comment: Typo fix on solution 2: def _is_sunder(name): """Returns True if a _sunder_ name, False otherwise.""" return (name[:1] == name[-1:] == '_' and name[1:2] != '_' and name[-2:-1] != '_' and len(name) > 2) --

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-05 Thread Maxwell
New submission from Maxwell : This is a really minor bug. In enum.py the function _is_sunder(name) fails on empty string with an IndexError. As a result, attempting to create an Enum with an empty string fails. >>> from enum import Enum >>> Yay = Enum('Yay', ('', 'B', 'C')) Traceback (most