[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - pitrou stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b1dbd8827e79 by Antoine Pitrou in branch 'default': Issue #3665: \u and \U escapes are now supported in unicode regular expressions. http://hg.python.org/cpython/rev/b1dbd8827e79 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Antoine Pitrou pit...@free.fr added the comment: Any chance to commit the patch today and to get this feature in Python 3.3? Thanks for reminding us! It's now in 3.3. -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Thank you for the quick response. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: I forgot about byte patterns. Here is an updated patch. -- Added file: http://bugs.python.org/file26040/re_unicode_escapes-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Here is updated (in conforming with PEP 393) patch. In additional octal and hexadecimal escaping cleared, illegal error message for hexadecimal escaping fixed. Added new tests for octal and hexadecimal escaping. -- Added file: http://bugs.python.org/file26035/re_unicode_escapes-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: Georg, Atsuo, how are you? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Serhiy Storchaka storch...@gmail.com added the comment: I don't think it is worth to target it for 2.7 and 3.2 (it's new feature, not bugfix), but for 3.3 it will be very useful. Since PEP 393 conversion to the surrogate pairs is no longer relevant. -- components: +Regular Expressions, Unicode nosy: +storchaka type: behavior - enhancement versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25781/re_unicode_escapes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25782/3665.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25781/re_unicode_escapes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file25782/3665.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25783/re_unicode_escapes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file25784/3665.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2, Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Éric Araujo mer...@netwok.org added the comment: FYI, +raise error(bogus escape: %s % repr(escape)) can be written simply as +raise error(bogus escape: %r % escape) -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Atsuo Ishimoto ishim...@gembook.org added the comment: Here's an updated patch for py3k branch. As per Georg's comment, I added to check codepoint in the character ranges, conversion to the surrogate pairs. I also added check to raise exception if codepoint 0x10. I with to English speakers to fix error messages in the patch. -- nosy: +ishimoto Added file: http://bugs.python.org/file17939/3665.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: -- nosy: +timehorse ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: -- versions: +Python 2.7, Python 3.1 -Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
New submission from Georg Brandl [EMAIL PROTECTED]: Since \u and \U aren't interpolated in raw strings anymore, the re module should support those escapes in addition to the \x and octal ones it already does. Attached patch. -- components: Library (Lib) files: re_unicode_escapes.diff keywords: patch messages: 71861 nosy: georg.brandl priority: critical severity: normal status: open title: Support \u and \U escapes in regexes type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file11235/re_unicode_escapes.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Antoine Pitrou [EMAIL PROTECTED] added the comment: - Check that it also works for chars 0x (even in UCS2 builds, at least when the chars are not part of [character range]) - What does happen with e.g. [\U0001-\U00010001] on an UCS build? -- nosy: +pitrou ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Antoine Pitrou [EMAIL PROTECTED] added the comment: (in the last sentence, I meant UCS2. Sorry) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3665] Support \u and \U escapes in regexes
Georg Brandl [EMAIL PROTECTED] added the comment: These concerns indeed must be handled: On narrow unicode builds, chars 0x must be converted to surrogates. In ranges, they should raise an error. Additionally, this should at least raise an error too: re.compile([\U0010]).match(\U0010).group() '\udbc0' ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3665 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com