[issue3723] Py_NewInterpreter does not work

Martin v. Löwis report at bugs.python.org
Fri Oct 17 17:47:29 CEST 2008


Martin v. Löwis <martin at v.loewis.de> added the comment:

Here is a patch that fixed importexc.c. It consists of the following parts:
- set m_size of the builtins module and the sys module to -1, indicating
that these modules don't support repeated initialization. This should be
reviewed; perhaps it's better (and necessary) to record the init
function not only for dynamically-loaded modules in m_init, but also for
statically linked ones, so that the reinit code can call them again
(whether or not it is safe to call them again for sys and builtins
should then be studied).
- add a field to the interpreter state indicating that the codecs are
not ready. when trying to use the file system encoding in this state,
use ASCII instead.
- Fix importexc to use the types module.

Added file: http://bugs.python.org/file11820/importexc.diff

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


More information about the Python-bugs-list mailing list