[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Roundup Robot added the comment: New changeset 5b5c2c3b2268 by Ezio Melotti in branch '2.7': #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/5b5c2c3b2268 New changeset 29983dd7191e by Ezio Melotti in branch '3.2': #12759: sre_parse now raises a proper error when the name of the group is missing. Initial patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/29983dd7191e New changeset 28be586287c8 by Ezio Melotti in branch '3.3': #12759: merge with 3.2. http://hg.python.org/cpython/rev/28be586287c8 New changeset 3f4fbad75c99 by Ezio Melotti in branch 'default': #12759: merge with 3.3. http://hg.python.org/cpython/rev/3f4fbad75c99 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Ezio Melotti added the comment: I updated the patch to use 'missing group name' instead of 'bad group name', and added a couple more tests. This also fixes the issue in redemo.py. Thanks Serhiy and Masha for the patches! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Serhiy Storchaka added the comment: Here is an updated patch. More appropriate error message used, many new tests added. -- keywords: +patch stage: needs patch - patch review versions: +Python 3.4 Added file: http://bugs.python.org/file27831/sre_empty_group_name.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Serhiy Storchaka added the comment: My only question is, the exception we raise now says, there invalid characters in the group name, whether in our case the group name is just empty. Good point. It would be better if you move the test outside isname() function and immediately raise an error with an appropriate message. -- nosy: +serhiy.storchaka stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Changes by Éric Araujo mer...@netwok.org: -- assignee: - ezio.melotti stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Masha Katsman mkats...@yahoo.com added the comment: Updating the patch with the test. The test checks that the re exception is thrown in case of the (?P=) and (?P) expressions. It used to raise an Index exception. My only question is, the exception we raise now says, there invalid characters in the group name, whether in our case the group name is just empty. -- Added file: http://bugs.python.org/file23769/patch_for_12759 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Ezio Melotti ezio.melo...@gmail.com added the comment: Thanks for the patch! The patch should also include tests for this case in Lib/test/test_re.py -- components: +Regular Expressions stage: needs patch - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Masha Katsman mkats...@yahoo.com added the comment: I am working on the patch. The fix is ready. Will be delivered shortly. It is also broken when I specify (?P) pattern -- nosy: +mashayk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Masha Katsman mkats...@yahoo.com added the comment: The problem with the above expression is that it does not specify a group name. The expression itself is not right. So, it blows up when it tries to parse the name. I put the check for the empty name before any processing is done. -- Added file: http://bugs.python.org/file23751/patch_for_12759 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Éric Araujo mer...@netwok.org added the comment: Great! Feel free to ask any questions here or through the core-mentorship mailing list. Remember to read the devguide and work from a Mercurial clone of Python 3.2. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Alexander fred...@mail.ru added the comment: I would like to make a patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12759] (?P=) input for Tools/scripts/redemo.py raises unnhandled exception
Éric Araujo mer...@netwok.org added the comment: I can reproduce in 3.3 (the file has been moved to Tools/demo/redemo.py). The Tk application does not crash but there is a traceback. Would you like to work on a patch? If so, there are good guidelines in the devguide. -- keywords: +easy nosy: +eric.araujo stage: - needs patch title: (?P=) input for Tools/scripts/redemo.py throw an exception - (?P=) input for Tools/scripts/redemo.py raises unnhandled exception versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12759 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com