[New-bugs-announce] [issue20654] Pydoc (and help) fails with socket.AddressFamily

Serhiy Storchaka report at bugs.python.org
Mon Feb 17 08:25:53 CET 2014


New submission from Serhiy Storchaka:

$ ./python -m pydoc socket.AddressFamily
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 171, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2600, in <module>
    cli()
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2565, in cli
    help.help(arg)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1847, in help
    elif request: doc(request, 'Help on %s:', output=self._output)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1585, in doc
    pager(render_doc(thing, title, forceload))
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in render_doc
    return title % desc + '\n\n' + renderer.document(object, name)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 357, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1284, in docclass
    lambda t: t[1] == 'data')
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1248, in spilldata
    getattr(object, name, None) or homecls.__dict__[name],
KeyError: 'AF_UNSPEC'

But it works with other enum types: socket.SocketType, plistlib.PlistFormat, ssl.Purpose.

----------
components: Library (Lib)
messages: 211395
nosy: barry, eli.bendersky, ethan.furman, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Pydoc (and help) fails with socket.AddressFamily
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20654>
_______________________________________


More information about the New-bugs-announce mailing list