[issue23622] Deprecate unrecognized backslash+letter escapes in re

2015-03-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7384db2fce8a by Serhiy Storchaka in branch 'default':
Fixed using deprecated escaping in regular expression in _strptime.py 
(issue23622).
https://hg.python.org/cpython/rev/7384db2fce8a

--

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



[issue23622] Deprecate unrecognized backslash+letter escapes in re

2015-03-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 014031a4d398 by Serhiy Storchaka in branch 'default':
Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
https://hg.python.org/cpython/rev/014031a4d398

--
nosy: +python-dev

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



[issue23622] Deprecate unrecognized backslash+letter escapes in re

2015-03-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23622] Deprecate unrecognized backslash+letter escapes in re

2015-03-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
title: Deprecate unrecognized backslash+letter escapes - Deprecate 
unrecognized backslash+letter escapes in re

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



[issue23622] Deprecate unrecognized backslash+letter escapes

2015-03-13 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue23622] Deprecate unrecognized backslash+letter escapes

2015-03-09 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Regular expressions use the backslash character for two functions:
1) to indicate special forms;
2) to allow special characters to be used without invoking their special 
meaning.

If backslash + character is not recognized as special form (1), it interpreted 
in meaning (2).

Usually new special forms have form backslash + ASCII letter, because unlike to 
other characters single ASCII letters do not have special meaning in any 
regular expression engine or programming language. This using the backslash 
with inner ASCII letter dangerous. Currently it means just this letter 
literally, but in future it can mean special form. For example \u and \U forms 
were added in 3.3 and this could break regular expression patters that use \u 
and \U before.

To avoid possible breaking it makes sense to reject unrecognized backslash + 
ASCII letter sequences. Proposed patch adds deprecation warnings when unknown 
escape of ASCII letter is used. The idea was proposed by Matthew Barnett [1].

[1] http://permalink.gmane.org/gmane.comp.python.devel/151657

--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
files: re_deprecate_escaped_letters.patch
keywords: patch
messages: 237645
nosy: ezio.melotti, mrabarnett, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Deprecate unrecognized backslash+letter escapes
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38406/re_deprecate_escaped_letters.patch

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