[Import-sig] imputil.py patch

Gordon McMillan gmcm@hypernet.com
Wed, 18 Jul 2001 15:40:22 -0400

> > You have to go below xml/__init__.py. That one shows up as both
> > xml and _xmlplus in both cases. But try, say, xml.sax.saxlib.
> Ok, now I see the difference.
> However, I'm not using any xml stuff myself, so
> here the question: Does this change fix anything
> which is currently broken? Do you have a test
> script?
> The only effect I can currently see is that it breaks
> py2exe...

Not surprised. The fqname coming into get_code is now 
'xml.sax', instead of '_xmlplus.sax'. I stuff the archive's name 
for the module into the module's dict before returning it. Then I 
can pull it out of parent and build the child's internal name.

My test code is:
import test_dom
import test_encodings
import test_howto
import xml.dom.html
import test_htmlb
import test_marshal
import test_pyexpat
import test_minidom
import test_sax
import test_sax_xmlproc
import test_saxdrivers
import test_utils

where those modules are the xmldoc/test modules. They're all 
the tests that pass in xmldoc/regrtest. A couple fail without 
the patch. IIRC, the first to fail would be test_htmlb.

- Gordon