[Python-Dev] regrtest.py mystery
Fred L. Drake, Jr.
Sat, 15 Dec 2001 18:53:57 -0500
Martin v. Loewis writes:
> Python/codecs.c holds search functions in _PyCodec_SearchPath, among
> them encodings.__init__.search_function. It also imports "encodings"
> the first time somebody invokes .encode/.decode on some kind of
> string, but doesn't hold onto the module.
Perhaps it should hold onto the module as well? That would avoid it
getting cleaned up before possibly dependent modules.
For the test case problem, perhaps there should be a list of
exceptional modules that don't get cleaned up by regrtest once they
appear. encodings and warnings would probably both need to be on the
list. This list should probably be in the sys module; it would also
be useful for the RollbackImporter in the unittestgui.py script that
comes with the separate PyUnit package.
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation