Skip to content

pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat) #45361

Closed

Description

@nnorwitz
mannequin
BPO 1020
Nosy @gvanrossum, @freddrake, @tiran

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/freddrake'
closed_at = <Date 2007-11-21.00:55:13.090>
created_at = <Date 2007-08-25.17:27:41.660>
labels = ['library']
title = "pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)"
updated_at = <Date 2008-01-06.22:29:45.331>
user = 'https://bugs.python.org/nnorwitz'

bugs.python.org fields:

activity = <Date 2008-01-06.22:29:45.331>
actor = 'admin'
assignee = 'fdrake'
closed = True
closed_date = <Date 2007-11-21.00:55:13.090>
closer = 'christian.heimes'
components = ['Library (Lib)']
creation = <Date 2007-08-25.17:27:41.660>
creator = 'nnorwitz'
dependencies = []
files = []
hgrepos = []
issue_num = 1020
keywords = []
message_count = 3.0
messages = ['55289', '57251', '57721']
nosy_count = 4.0
nosy_names = ['gvanrossum', 'fdrake', 'nnorwitz', 'christian.heimes']
pr_nums = []
priority = 'high'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1020'
versions = ['Python 3.0']

Activity

  1. nnorwitz commented on Aug 25, 2007

    nnorwitzmannequin
    MannequinAuthor

    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
  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 25, 2007
  3. tiran commented on Nov 8, 2007

    @tiran
    Member

    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.

  4. changed the title [-]pydoc doesn't work on pyexpat[/-] [+]pyexpat.XMParserType broken (was: pydoc doesn't work on pyexpat)[/+] on Nov 8, 2007
  5. tiran commented on Nov 21, 2007

    @tiran
    Member

    Fixed in r59083
    The sentinel in the methods list of XMLparsetype was missing.

  6. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directory

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions