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

STINNER Victor report at bugs.python.org
Thu Sep 30 00:52:59 CEST 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> Indeed, the fs encoding isn't initialized until later in
> Py_InitializeEx. Maybe the PYTHONWARNINGS code should be moved 
> there instead?

sys.warnopts should be filled early because it is used to initialize the _warnings module, and the _warnings module have to be initialized before loading another non-builtin module because importing a module may emit a warning.

> OK, so who's messing up: subprocess or Py_main()?

I opened issue #9992 to decide which encoding should be used to encode and decode command line arguments: locale or filesystem encoding.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9988>
_______________________________________


More information about the Python-bugs-list mailing list