Barry A. Warsaw added the comment: On Nov 22, 2016, at 04:13 PM, Serhiy Storchaka wrote:
>Could Mailman be fixed? Undefined combinations of \ + ASCII emitted warnings >in 3.5. And now they emit warnings even just in string literals >(issue27364). If Mailman use undefined escape combinations, it could suffer >from issue27364 too. No, I think this is a valid bug/regression. The Mailman code is basically trying to do this: p = re.compile('%\d*d') p.sub(r'\s*\d+\s*', some_string) And so we get the error: sre_constants.error: bad escape \s at position 0 But this directly contradicts the documentation for re.sub(): "... if it is a string, any backslash escapes in it are processed. That is, \n is converted to a single newline character, \r is converted to a carriage return, and so forth. Unknown escapes such as \& are left alone." Clearly \s is not being left alone, so this is a real regression. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27030> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com