STINNER Victor <victor.stin...@haypocalc.com> added the comment: > Maybe the PYTHONWARNINGS code should be moved there instead?
sys.warnoptions is read by the warnings module (not the _warnings module) when this module is loaded. The warnings module is loaded by Py_InitializeEx() if sys.warnoptions list is not empty. It might be possible to read PYTHONWARNINGS env var after initfsencoding() but before loading the warnings module. But we have to ensure that Py_InitializeEx() can still be called multiple times. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9988> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com