[issue21548] pydoc -k IndexError on empty docstring
Roundup Robot added the comment: New changeset 43641e03692a by Berker Peksag in branch '2.7': Issue #21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty https://hg.python.org/cpython/rev/43641e03692a -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Roundup Robot added the comment: New changeset 9436f43b6df2 by Benjamin Peterson in branch '3.4': fix pydoc.apropos and pydoc.synopsis on modules with empty docstrings (#21548) https://hg.python.org/cpython/rev/9436f43b6df2 New changeset 534b26837a13 by Benjamin Peterson in branch 'default': merge 3.4 (#21548) https://hg.python.org/cpython/rev/534b26837a13 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Berker Peksag added the comment: Here's a patch with tests. -- nosy: +berker.peksag stage: - patch review Added file: http://bugs.python.org/file37841/issue21548.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Yuyang Guo added the comment: Made change based on Terry J. Reedy's suggestion -- keywords: +patch nosy: +Yuyang.Guo Added file: http://bugs.python.org/file35516/issue21548.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Benjamin Peterson added the comment: Thanks for the patch! It looks like the synopsis function also has this bug. Could you fix that, too? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
Terry J. Reedy added the comment: Replacing 2061 with the following should work for all versions. desc = module.__doc__.splitlines()[0] if module.__doc__ else '' -- nosy: +terry.reedy type: - behavior versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21548] pydoc -k IndexError on empty docstring
New submission from Dima Tisnek: While trying to track down another bug, I disabled some packages: [dima@bmg tmp]$ chmod a-x /usr/lib/python3.4/site-packages/speechd* Then ran pydoc -k: [dima@bmg tmp]$ pydoc3.4 -k n688954789 Traceback (most recent call last): File /usr/bin/pydoc3.4, line 5, in module pydoc.cli() File /usr/lib/python3.4/pydoc.py, line 2548, in cli apropos(val) File /usr/lib/python3.4/pydoc.py, line 2080, in apropos ModuleScanner().run(callback, key, onerror=onerror) File /usr/lib/python3.4/pydoc.py, line 2061, in run desc = (module.__doc__ or '').splitlines()[0] IndexError: list index out of range Clearly .splitlines() is always empty; missing doc is not handled correctly. -- components: Library (Lib) messages: 218865 nosy: Dima.Tisnek priority: normal severity: normal status: open title: pydoc -k IndexError on empty docstring versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21548 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com