[XML-SIG] Some pyXML Bugs in PyXML 0.6.2 and 4Suite for Python 1.5.2

Thomas B. Passin tpassin@home.com
Tue, 6 Feb 2001 23:52:12 -0500

I started trying out some of the demos that come with PyXML and 4Suite -
actually I got them by downloading the source for 4Suite from the 4Suite
server.  I've picked up some bugs.  Most, but not all, are in test or demo
scripts, but some are in actual working modules.  I've only tried out a few
things, so this is not comprhensive at all.

My system is Python 1.5.2. on Windows 98, with PyXML 0.6.2.

First, a number of modules reference the "core" module, which isn't there (any
more, I assume?).  Some are tests, some are not.  I don't have a list at the
moment, but they should be flushed out.

Second, in xml\dom\ext\PyExpat.py, the import pyexpat statement doesn't throw
an ImportError, but a NameError (seems strange).  I fixed it  like this (I
used Exception instead of NameError, in case some other versoin should throw
ImportError as you would expect.
line 27:
    #Python 2.0
    import pyexpat
#except ImportError:   ==>Currently this import throws NameError, not
except  Exception:
    #Python 1.x with PyXML
    from xml.parsers import pyexpat

I don't think this is really the way to fix it, though - there must be some
reason I'm getting an unexpected type of exception, and that is what ought to
be fixed.

Finally, in Ft\Xlink\XLinkElements.py, reader.fromURI() has an additional
argument which is no longer used in the reader's parent class.  I fixed it
like this, commenting out the extra arg so you can see it:

line 51:
       frag = reader.fromUri(self.href)#, doc = doc) ==> API doesn't include
'doc' arg

It looks to me like there are a lot of left-over things that haven't gotten
caught yet, and a lot of the tests haven't run for me - DOM seems OK but XLink
and XPointer have given problems.  They look like the kind of things that
wouldn't have been worked for 0.6.3, but I haven't tried that yet.

I'm not sure who shoud be putting fixes for these bugs in once they are agreed
on.  I'm still not getting secure access negotiated properly, so it's not
going to be me for while yet.


Tom P