STINNER Victor <victor.stin...@haypocalc.com> added the comment: > Here is a patch. It moves warnings initialization after > io initialization (the latter being arguably more critical > than the former). Also adds two tests.
initstdio() and initmain() may emit warnings. Eg. issue #8766 (which now have a test in test_warnings). It's possible to initialize warnings before initstdio() by rewriting more warnings functions in C (into _warnings). But I don't think that it would solve all issues: emit a warning may write text into stderr, and if stderr is not ready yet, it doesn't work anyway. So I'm ok to exchange initstdio() and warnings initialization: we may loose some warnings, but at least, the warnings machinery will be operational. But Antoine, could you please add a comment to explain why warnings is initialized after initstdio()? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10372> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com