[issue20123] pydoc.synopsis fails to load binary modules

R. David Murray report at bugs.python.org
Sun Jan 5 03:47:42 CET 2014


R. David Murray added the comment:

In 2.7 the code just does an open.  Victor changed it to call tokenize.open in 3.2, but tokenize.open obviously only works on python source files.  So the logic of that method is now completely wrong.

I'm not sure the logic made a lot of sense even before...if the extension is binary it just closes it again.  So the initial open is for its side effect of returning None if the file can't be opened.

Anyway, the logic of that method clearly needs to be rewritten.  And obviously there are some missing tests....

I don't see any patch attached to the issue, by the way.

----------
nosy: +haypo, r.david.murray
versions: +Python 3.3, Python 3.4

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


More information about the Python-bugs-list mailing list