- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
Issue21548
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.
Created on 2014-05-21 08:43 by Dima.Tisnek, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue21548.patch | Yuyang.Guo, 2014-06-07 18:13 | review | ||
| issue21548.diff | berker.peksag, 2015-01-25 00:30 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg218865 - (view) | Author: Dima Tisnek (Dima.Tisnek) * | Date: 2014-05-21 08:43 | |
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. |
|||
| msg218998 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2014-05-23 21:07 | |
Replacing 2061 with the following should work for all versions. desc = module.__doc__.splitlines()[0] if module.__doc__ else '' |
|||
| msg219956 - (view) | Author: Yuyang Guo (Yuyang.Guo) * | Date: 2014-06-07 18:13 | |
Made change based on Terry J. Reedy's suggestion |
|||
| msg219971 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2014-06-07 20:13 | |
Thanks for the patch! It looks like the "synopsis" function also has this bug. Could you fix that, too? |
|||
| msg234641 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2015-01-25 00:30 | |
Here's a patch with tests. |
|||
| msg236117 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2015-02-16 22:44 | |
LGTM. |
|||
| msg236119 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2015-02-17 00:45 | |
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 |
|||
| msg236261 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2015-02-20 10:09 | |
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 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:03 | admin | set | github: 65747 |
| 2015-02-20 10:10:26 | berker.peksag | set | status: open -> closed resolution: fixed stage: commit review -> resolved |
| 2015-02-20 10:09:38 | python-dev | set | messages: + msg236261 |
| 2015-02-17 00:45:49 | python-dev | set | nosy:
+ python-dev messages: + msg236119 |
| 2015-02-16 22:44:14 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg236117 stage: patch review -> commit review |
| 2015-01-25 00:30:55 | berker.peksag | set | files:
+ issue21548.diff nosy: + berker.peksag messages: + msg234641 stage: patch review |
| 2014-06-07 20:13:13 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg219971 |
| 2014-06-07 18:13:15 | Yuyang.Guo | set | files:
+ issue21548.patch nosy: + Yuyang.Guo messages: + msg219956 keywords: + patch |
| 2014-06-02 00:38:33 | r.david.murray | set | keywords: + easy |
| 2014-05-23 21:07:00 | terry.reedy | set | versions:
+ Python 2.7, Python 3.5 nosy: + terry.reedy messages: + msg218998 type: behavior |
| 2014-05-21 08:43:03 | Dima.Tisnek | create | |



