Author barry
Recipients barry, ezio.melotti, mrabarnett, python-dev, serhiy.storchaka
Date 2016-11-22.18:19:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20161122131920.108af7a6@subdivisions.wooz.org>
In-reply-to <1479831187.83.0.397367235616.issue27030@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2016-11-22 18:19:24barrysetrecipients: + barry, ezio.melotti, mrabarnett, python-dev, serhiy.storchaka
2016-11-22 18:19:23barrylinkissue27030 messages
2016-11-22 18:19:23barrycreate