[issue10914] Python sub-interpreter test

STINNER Victor report at bugs.python.org
Mon Apr 25 23:28:56 CEST 2011


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

Modules/_testembed fails with ISO-8859-15 locale encoding because of a bootstrap issue. The problem is that the filesystem encoding codec is implemented in Python: Python requires the codec to loads modules, but it has to load a module to load the codec. I already solved this issue in Python using C functions instead of the Python codec until Python is able to load modules (able to load the Python codec).

The problem is the test on the "python initialization": PyUnicode_EncodeFSDefault / PyUnicode_DecodeFSDefaultAndSize check the global Py_FileSystemDefaultEncoding variable (use C functions if it is NULL).

We should use C functions if Py_FileSystemDefaultEncoding is NULL *or* if interp->codecs_initialized is zero.

I think that Python used interp->codecs_initialized flag. I removed the test on interp->codecs_initialized because I thought that it was useless.

----------

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


More information about the Python-bugs-list mailing list