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 vstinner
Recipients eric.snow, ncoghlan, serhiy.storchaka, vstinner
Date 2017-03-23.17:49:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I modified more modules to use the new API. I'm not sure that using the API in modules is safe.

It's safe to use the API in functions which begins with trying to initialize the variable. In such case, if the variable is cleared, calling the function later initialize again the variable and it's fine.

When for module variables only initialized when the module is initialized, there is a risk that a module function tries to access a variable which has been cleared previously during Python shutdown.

See for example changes in the _datetime module.
Date User Action Args
2017-03-23 17:49:34vstinnersetrecipients: + vstinner, ncoghlan, eric.snow, serhiy.storchaka
2017-03-23 17:49:34vstinnersetmessageid: <>
2017-03-23 17:49:34vstinnerlinkissue29881 messages
2017-03-23 17:49:34vstinnercreate