[XML-SIG] [Bug #126275] pyexpat.c doesn't match docs or SAX parser
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 18 Dec 2000 20:06:19 -0800
Bug #126275, was updated on 2000-Dec-18 20:06
Here is a current snapshot of the bug.
Project: Python/XML
Category: expat
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: uche
Assigned to : nobody
Summary: pyexpat.c doesn't match docs or SAX parser
Details: _xmlplus/sax/expatreader.py, line 81
self._parser.Parse(data, isFinal)
And the Python 2.0 docs say this is right.
But 'ave a butcher's at PyXML-0.6.1/extensions/pyexpat.c line 379 and following, particularly the PyArg_ParseTuple
static PyObject *
xmlparse_Parse(xmlparseobject *self, PyObject *args)
{
char *s;
int slen;
int isFinal = 0;
int rv;
if (!PyArg_ParseTuple(args, "s#|i:Parse", &s, &slen, &isFinal))
return NULL;
Uh oh. Surely enough:
>>> doc = r.fromString(s)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.0/site-packages/Ft/Lib/ReaderBase.py", line 49, in fromString
rt = self.fromStream(stream, ownerDoc)
File "/usr/local/lib/python2.0/site-packages/_xmlplus/dom/ext/reader/Sax2.py", line 267, in fromStream
self.parser.parse(stream)
File "/usr/local/lib/python2.0/site-packages/_xmlplus/sax/expatreader.py", line 42, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/lib/python2.0/site-packages/_xmlplus/sax/xmlreader.py", line 120, in parse
self.feed(buffer)
File "/usr/local/lib/python2.0/site-packages/_xmlplus/sax/expatreader.py", line 81, in feed
self._parser.Parse(data, isFinal)
TypeError: not enough arguments; expected 4, got 2
>>>
Hmm. So what's right? The C code or the SAX driver and docs?
Note: Python 2.0's pyexpat.c is the same way as PyXML's
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=126275&group_id=6473