New submission from Serhiy Storchaka:

In 3.4 pydoc fails for the TkappType and TkttType names in the _tkinter module.

$ ./python -m pydoc _tkinter.TkappType
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 189, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/serhiy/py/cpython/Lib/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2593, in <module>
    cli()
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 2558, in cli
    help.help(arg)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1840, in help
    elif request: doc(request, 'Help on %s:', output=self._output)
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1578, in doc
    pager(render_doc(thing, title, forceload))
  File "/home/serhiy/py/cpython/Lib/pydoc.py", line 1555, in render_doc
    module = inspect.getmodule(object)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 610, in getmodule
    file = getabsfile(object, _filename)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 593, in getabsfile
    _filename = getsourcefile(object) or getfile(object)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 569, in getsourcefile
    filename = getfile(object)
  File "/home/serhiy/py/cpython/Lib/inspect.py", line 519, in getfile
    object = sys.modules.get(object.__module__)
AttributeError: __module__

And same for _tkinter.TkttType.

This issue can be easy fixed for the _tkinter module, but general solution is 
needed, because pydoc in 3.4 still can be broken for third-party code.

----------
files: tkinter_typespecs.patch
keywords: 3.4regression, patch
messages: 207733
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: pydocs fails for some C implemented classes
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33375/tkinter_typespecs.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20204>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to