Daniel Diniz <aja...@gmail.com> added the comment:

This bug seems to break help(C-module) in py3k after rev 70587:

>>> import pickle
>>> help(pickle)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/py3k/Lib/site.py", line 429, in __call__
    return pydoc.help(*args, **kwds)
  File "~/py3k/Lib/pydoc.py", line 1709, in __call__
    self.help(request)
  File "~/py3k/Lib/pydoc.py", line 1755, in help
    else: doc(request, 'Help on %s:')
  File "~/py3k/Lib/pydoc.py", line 1505, in doc
    pager(render_doc(thing, title, forceload))
  File "~/py3k/Lib/pydoc.py", line 1500, in render_doc
    return title % desc + '\n\n' + text.document(object, name)
  File "~/py3k/Lib/pydoc.py", line 320, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "~/py3k/Lib/pydoc.py", line 1086, in docmodule
    contents.append(self.document(value, key, name))
  File "~/py3k/Lib/pydoc.py", line 321, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "~/py3k/Lib/pydoc.py", line 1131, in docclass
    doc = getdoc(object)
  File "~/py3k/Lib/pydoc.py", line 81, in getdoc
    result = inspect.getdoc(object) or inspect.getcomments(object)
  File "~/py3k/Lib/inspect.py", line 581, in getcomments
    lines, lnum = findsource(object)
  File "~/py3k/Lib/inspect.py", line 524, in findsource
    lines = linecache.getlines(file, module.__dict__)
  File "~/py3k/Lib/linecache.py", line 41, in getlines
    return updatecache(filename, module_globals)
  File "~/py3k/Lib/linecache.py", line 130, in updatecache
    lines = fp.readlines()
  File "~/py3k/Lib/codecs.py", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 24:
unexpected code byte


brodierao's patch fixes it.

----------
nosy: +haypo
priority: normal -> release blocker
versions: +Python 3.1

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

Reply via email to