◐ Shell
clean mode source ↗

Message 134417 - Python tracker

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.