classification
Title: pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)
Type: Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: christian.heimes, fdrake, gvanrossum, nnorwitz
Priority: high Keywords:

Created on 2007-08-25 17:27 by nnorwitz, last changed 2008-01-06 22:29 by admin. This issue is now closed.

Messages (3)
msg55289 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-08-25 17:27
help(pyexpat) causes an exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/neal/python/dev/py3k/Lib/site.py", line 350, in __call__
    return pydoc.help(*args, **kwds)
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1685, in __call__
    self.help(request)
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1729, in help
    else: doc(request, 'Help on %s:')
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1512, in doc
    pager(render_doc(thing, title, forceload))
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1490, in 
render_doc
    return title % desc + '\n\n' + text.document(object, name)
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 319, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1076, in 
docmodule
    contents.append(self.document(value, key, name))
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 320, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/home/neal/python/dev/py3k/Lib/pydoc.py", line 1126, in docclass
    mro = deque(inspect.getmro(object))
TypeError: 'NoneType' object is not iterable
msg57251 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-08 14:28
It's not a problem with pydoc but a problem in the pyexpat module. I
believe that the C code is broken. See for yourself:

>>> dir(pyexpat.XMLParserType)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__',
'__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
'__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__str__', 'xZK\x08']

There is an issue in the method list. Since most lines of pyexpat were
written by fdrake I'm assigning the bug to him.
msg57721 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-21 00:55
Fixed in r59083
The sentinel in the methods list of XMLparsetype was missing.
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-21 00:55:13christian.heimessetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg57721
2007-11-20 01:16:55christian.heimessetnosy: + gvanrossum
2007-11-08 14:28:39christian.heimessettitle: pydoc doesn't work on pyexpat -> pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)
nosy: + fdrake, christian.heimes
messages: + msg57251
priority: low -> high
assignee: fdrake
keywords: + py3k
resolution: accepted
2007-09-17 06:15:49jafosetpriority: low
2007-08-25 17:27:41nnorwitzcreate