[issue17341] Poor error message when compiling invalid regex

2013-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 65db865c0851 by R David Murray in branch '3.3':
#17341: Include name in re error message about invalid group name.
http://hg.python.org/cpython/rev/65db865c0851

New changeset 227fed7a05d4 by R David Murray in branch 'default':
Merge #17341: Include name in re error message about invalid group name.
http://hg.python.org/cpython/rev/227fed7a05d4

New changeset bbb3aa45b4ea by R David Murray in branch '2.7':
#17341: Include name in re error message about invalid group name.
http://hg.python.org/cpython/rev/bbb3aa45b4ea

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-04-14 Thread R. David Murray

R. David Murray added the comment:

Thanks Jason.

--
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-04-13 Thread Jason Michalski

Changes by Jason Michalski arm...@armooo.net:


--
keywords: +patch
Added file: http://bugs.python.org/file29802/cpython-3.3-17341.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-04-13 Thread Jason Michalski

Changes by Jason Michalski arm...@armooo.net:


Added file: http://bugs.python.org/file29803/cpython-2.7-17341.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-03-04 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue14462. It will be easier to include a full group name than an 
invalid character.

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-03-03 Thread Roy Smith

New submission from Roy Smith:

 re.compile('(?P=foo)')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/roy/env/python/lib/python2.7/re.py, line 190, in compile
return _compile(pattern, flags)
  File /home/roy/env/python/lib/python2.7/re.py, line 242, in _compile
raise error, v # invalid expression
sre_constants.error: bad character in group name


The error here is that I put a = where it shouldn't be.  The error message is 
misleading.  The group name is the stuff between the 's.  That part's fine. 
 What's broken is the stuff outside of the 's.

Unclear if it's reasonable to expect such precise error reporting here, but 
this one seems particularly misleading, so opening a ticket to record the 
observation.

--
components: Regular Expressions
messages: 183375
nosy: ezio.melotti, mrabarnett, roysmith
priority: normal
severity: normal
status: open
title: Poor error message when compiling invalid regex
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17341] Poor error message when compiling invalid regex

2013-03-03 Thread R. David Murray

R. David Murray added the comment:

The error is that '' is not legal in a group name, and the parser is parsing 
the P= form.  The error message could be improved by including the bad 
character in the message.

--
keywords: +easy
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com