Staging
v0.5.1
https://github.com/python/cpython
Revision b22273ec5d1992b0cbe078b887427ae9977dfb78 authored by INADA Naoki on 13 October 2017, 07:02:23 UTC, committed by GitHub on 13 October 2017, 07:02:23 UTC
Pattern `[a-z]` with `IGNORECASE` flag can match to some non-ASCII characters.

Straightforward solution for this is using `IGNORECASE | ASCII` flag.
But users may subclass `Template` and override only `idpattern`. So we want to
avoid changing `Template.flags`.

So this commit uses local flag `-i` for `idpattern` and change `[a-z]` to `[a-zA-Z]`.
1 parent 9255104
History
Tip revision: b22273ec5d1992b0cbe078b887427ae9977dfb78 authored by INADA Naoki on 13 October 2017, 07:02:23 UTC
bpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)
Tip revision: b22273e
File Mode Size
CODEOWNERS -rw-r--r-- 1.5 KB
CONTRIBUTING.rst -rw-r--r-- 2.3 KB
PULL_REQUEST_TEMPLATE.md -rw-r--r-- 316 bytes
appveyor.yml -rw-r--r-- 711 bytes
codecov.yml -rw-r--r-- 482 bytes

back to top