hai shi <shihai1...@126.com> added the comment:

Wow, Thanks, victor, much useful infos.

>In Python 3, _PyWarnings_Init() calls PyModule_Create() which creates a module 
>but doesn't add it to sys.modules.

this operation will be executed in _bootstrap_external.

> We want the _warnings module to be ready as early as possible.

if we don't load _warnings module as soon as possible, what possible risks will 
be raise? 

> There are C functions which access the module state 
> (tstate->interp->warnings) without going through the module object, like 
> PyErr_WarnFormat().

This is important info.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39796>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to