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 Oren Milman
Recipients Oren Milman
Date 2017-09-26.12:54:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code causes an assertion failure:

import unicodedata
def bad_normalize(*args):
    return None

unicodedata.normalize = bad_normalize
import ast

This is because init_normalization() (in Python/ast.c) assumes that
unicodedata.normalize() is valid, and stores it in the compiling struct.
Later, new_identifier() calls the stored function, assumes it returned a
string, and passes it to PyUnicode_InternInPlace(), which asserts it is a
Date User Action Args
2017-09-26 12:54:09Oren Milmansetrecipients: + Oren Milman
2017-09-26 12:54:08Oren Milmansetmessageid: <>
2017-09-26 12:54:08Oren Milmanlinkissue31592 messages
2017-09-26 12:54:08Oren Milmancreate