Author skrah
Recipients Arfrever, Gregory.Andersen, amaury.forgeotdarc, franck, georg.brandl, lemburg, ncoghlan, pitrou, serhiy.storchaka, skrah, stutzbach, vstinner
Date 2013-01-09.22:54:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Nick, I'm adding you to the nosy list since this issue seems related to PEP 432.

Quick summary: Globals are used in unicodeobject.c before they are initialized.
Also, Unicode objects are created before PyType_Ready(&PyUnicode_Type) has been

This happens during startup:





    Many Unicode objects like "" or "__add__" are created. Uninitialized
    globals have led to a crash (#16143). This is fixed by Serhiy's patch,
    which always dynamically checks all globals for NULL before using them.
    However, Unicode objects are still created at this point.


    PyType_Ready(&PyUnicode_Type); /* Called for the first time */



    for (i = 0; i < 256; i++)       /* Could leak if latin1 strings
        unicode_latin1[i] = NULL;      have already been created. */

    PyType_Ready(&PyUnicode_Type);  /* Called a second time! */

So, considering PEP 432:  Are these "pre-type-ready" Unicode objects
safe to use, or should something be done about it?
Date User Action Args
2013-01-09 22:54:13skrahsetrecipients: + skrah, lemburg, georg.brandl, amaury.forgeotdarc, ncoghlan, pitrou, vstinner, stutzbach, Arfrever, serhiy.storchaka, franck, Gregory.Andersen
2013-01-09 22:54:13skrahsetmessageid: <>
2013-01-09 22:54:12skrahlinkissue10156 messages
2013-01-09 22:54:12skrahcreate