]> granicus.if.org Git - python/commit
bpo-36878: Only allow text after `# type: ignore` if first character ASCII (GH-13504)
authorMichael J. Sullivan <sully@msully.net>
Wed, 22 May 2019 20:43:37 +0000 (13:43 -0700)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 22 May 2019 20:43:36 +0000 (13:43 -0700)
commitd8a82e2897b735e2b7e9e086f1d709365a2ad72c
tree205e3c569ca3d23346a4a8e3aa7bba46d352a7df
parent0c2b6a3943aa7b022e8eb4bfd9bffcddebf9a587
bpo-36878: Only allow text after `# type: ignore` if first character ASCII (GH-13504)

This disallows things like `# type: ignoreĆ©`, which seems wrong.

Also switch to using Py_ISALNUM for the alnum check, for consistency
with other code (and maybe correctness re: locale issues?).

https://bugs.python.org/issue36878
Lib/test/test_type_comments.py
Misc/NEWS.d/next/Core and Builtins/2019-05-22-11-16-16.bpo-36878.QwLa3P.rst [new file with mode: 0644]
Parser/tokenizer.c