This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients barry, ezio.melotti, methane, mrabarnett, serhiy.storchaka
Date 2017-10-03.13:51:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507038710.23.0.213398074469.issue31672@psf.upfronthosting.co.za>
In-reply-to
Content
Technically it *is* an API change since `flags` is a part of the public API.  The documentation says:

    $identifier names a substitution placeholder matching a mapping key of 
    "identifier". By default, "identifier" is restricted to any case-
    insensitive ASCII alphanumeric string (including underscores) that starts 
    with an underscore or ASCII letter. The first non-identifier character 
    after the $ character terminates this placeholder specification.

This means if someone does subclass string.Template and changes the pattern to accept Unicode identifiers, then with this change they will also have to modify flags, whereas before they didn't.

It really wasn't ever the intention to allow non-ASCII identifiers, so this is probably safe in practice.  OTOH, making the change for performance reasons might be questionable, given that the regular expressions are compiled by the Template's metaclass, so unlikely to contribute significantly to overall performance wins.
History
Date User Action Args
2017-10-03 13:51:50barrysetrecipients: + barry, ezio.melotti, mrabarnett, methane, serhiy.storchaka
2017-10-03 13:51:50barrysetmessageid: <1507038710.23.0.213398074469.issue31672@psf.upfronthosting.co.za>
2017-10-03 13:51:50barrylinkissue31672 messages
2017-10-03 13:51:50barrycreate