[issue22364] Improve some re error messages using regex for hints

2015-03-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue22364] Improve some re error messages using regex for hints

2015-03-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 068365acbe73 by Serhiy Storchaka in branch 'default': Issue #22364: Improved some re error messages using regex for hints. https://hg.python.org/cpython/rev/068365acbe73 -- nosy: +python-dev ___ Python tr

[issue22364] Improve some re error messages using regex for hints

2015-03-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please make a review? This patch is a prerequisite of other patches. -- ___ Python tracker ___ _

[issue22364] Improve some re error messages using regex for hints

2015-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Messages tend to be abbreviated, so I think that it would be better to just > omit the article. I agree, but this is came from standard error messages which are not consistent. I opened a thread on Python-Dev. "expected a bytes-like object" and "expected s

[issue22364] Improve some re error messages using regex for hints

2015-02-18 Thread Matthew Barnett
Matthew Barnett added the comment: Some error messages use the indefinite article: "expected a bytes-like object, %.200s found" "cannot use a bytes pattern on a string-like object" "cannot use a string pattern on a bytes-like object" but others don't: "expected string instance,

[issue22364] Improve some re error messages using regex for hints

2015-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for regex which makes some error messages be the same as in re with re_errors_2.patch. You could apply it to regex if new error messages look better than old error messages. Otherwise we could change re error messages to match regex, or discu

[issue22364] Improve some re error messages using regex for hints

2015-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Ezio's comments. -- Added file: http://bugs.python.org/file38080/re_errors_2.patch ___ Python tracker ___

[issue22364] Improve some re error messages using regex for hints

2015-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: re_errors_diff.txt contains differences for all tested error messages. -- Added file: http://bugs.python.org/file38036/re_errors_diff.txt ___ Python tracker _

[issue22364] Improve some re error messages using regex for hints

2015-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which unify and improves re error messages. Added tests for all parsing errors. Now error message always points on the start of affected component, i.e. on the start of bad escape, group name or unterminated subpattern. -- stage: nee

[issue22364] Improve some re error messages using regex for hints

2014-11-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I already said we should either stick with what we have if better (and gave examples, including sticking with 'cannot') or possibly combine the best of both if we can improve on both. 13 should use 'bytes-like' (already changed?). There is no review button.

[issue22364] Improve some re error messages using regex for hints

2014-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which makes re error messages match regex. It doesn't look to me that all these changes are enhancements. -- keywords: +patch Added file: http://bugs.python.org/file37167/re_errors_regex.patch ___ P

[issue22364] Improve some re error messages using regex for hints

2014-11-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add additional attributes to re.error, Other mentions of the buffer protocol ___ Python tracker ___ _

[issue22364] Improve some re error messages using regex for hints

2014-11-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue22364] Improve some re error messages using regex for hints

2014-11-01 Thread Ezio Melotti
Ezio Melotti added the comment: +1 on the idea. -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue22364] Improve some re error messages using regex for hints

2014-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > As for #14, either UNICODE and LOCALE *are* compatible (for re) or this is > buggy. This is buggy (issue22407). -- title: Unify error messages of re and regex -> Improve some re error messages using regex for hints ___

[issue22364] Improve some re error messages using regex for hints

2014-09-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Steven and Mark are correct that a tracker patch cannot change a 3rd party module. On the other hand, we are free to improve error messages in new versions. And we are free to borrow ideas from 3rd part modules. I changed the title accordingly. (Back compa