This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, loewis
Date 2008-08-29.12:11:09
SpamBayes Score 8.81612e-10
Marked as misclassified No
Message-id <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za>
In-reply-to
Content
The example Demo/embed/importexc.c crashes, because Py_NewInterpreter
cannot reimport builtins and sys modules. This problem seems important
for embedding applications like mod_python, for example.

(the "import exceptions" statement does not work with python 3.0, but
replacing with e.g. "import types" does not change anything: the
interpreter is not correctly renewed)

I tried to put "-1" in the m_size structure of these modules, and they
seem to import correctly. However, "builtins" comes with its original
dictionary - without the standard exceptions.

I think that these modules should be made re-importable, with specific
functions.

Maybe two related problems:
- once you've done
    del sys.modules['sys']
it's not possible to get it back, "import sys" raises an error...

- the usual trick to call sys.setdefaultencoding will not work, since it
needs to "imp.reload(sys)"
History
Date User Action Args
2008-08-29 12:11:10amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, loewis
2008-08-29 12:11:10amaury.forgeotdarcsetmessageid: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za>
2008-08-29 12:11:09amaury.forgeotdarclinkissue3723 messages
2008-08-29 12:11:09amaury.forgeotdarccreate