[issue9988] test_warnings fails with PYTHONFSENCODING=latin-1 on UNIX/BSD

STINNER Victor report at bugs.python.org
Thu Sep 30 02:12:38 CEST 2010


STINNER Victor <victor.stinner at 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 <report at bugs.python.org>
<http://bugs.python.org/issue9988>
_______________________________________


More information about the Python-bugs-list mailing list