[XML-SIG] Aligning PyXML and Python 2

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Sun, 17 Sep 2000 20:57:45 +0200

I have installed the first sweep of alignment between the Python 2 xml
package, and the PyXML xml package. To my knowledge, PyXML can now be
used as a full replacement of Python 2 xml (with one exception, see
next message on startElement). The specific changes were:

setup.py: Install drivers2
SAX:      Implement expatreader as a wrapper around drivers2/drv_pyexpat.
          Supply a number of names in xml.sax:
           ContentHandler, ErrorHandler, exceptions, ExpatParser, 
           make_parser,  parse, parseString
          Rename saxutils.XMLFilterImpl to XMLFilterBase; add XMLGenerator
DOM:      Add minidom and pulldom. The only change to pulldom was to
          inherit from ContentHandler. 

It seems that pyexpat is quite picky about exceptions in Python.
Without inheriting from ContentHandler, drv_expat would invoke
startPrefixMapping, which is not defined in PullDOM. The exception
lead to a clearance of all handlers, which lead to a segfault on the
next call to startElementHandler.
I have performed some tests, which indicate that at least the minidom
part behaves identical.

If there are no objections, I'd like to prepare a release of PyXML 0.6
for use on top of Python 2.0b1; this should be done regardless of any
open issues, and regardless of whether it works with Python 1.5 - I'm
sure users will report any problems they find with the package, so
0.6.1 will be better.