This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2014-01-09.12:47:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1389271655.86.0.224685657695.issue20204@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-09 12:47:35serhiy.storchakasetrecipients: + serhiy.storchaka
2014-01-09 12:47:35serhiy.storchakasetmessageid: <1389271655.86.0.224685657695.issue20204@psf.upfronthosting.co.za>
2014-01-09 12:47:35serhiy.storchakalinkissue20204 messages
2014-01-09 12:47:35serhiy.storchakacreate