Issue1550
Created on 2007-12-03 16:34 by benjhayden, last changed 2008-01-13 11:32 by ping.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
pydocbug.patch
|
benjhayden,
2007-12-03 16:34
|
|
|
|
| msg58131 (view) |
Author: Ben Hayden (benjhayden) |
Date: 2007-12-03 16:34 |
|
Instead of listing installed modules, help('modules') prints a "please
wait" message, then a traceback noting that a module raised an exception
during import, then nothing else.
This happens in 2.5 and 2.6a0, but not in 2.4, which apparently doesn't
__import__() EVERY module.
Tested only on Gentoo Linux 2.6.19, but same behavior is probable on
other platforms because pydoc and pkgutil are written in cross-platform
Python.
Prominent 3rd party libraries that break help('modules') include Django,
Pyglet, wxPython, SymPy, and Pypy. Arguably, the bug is in those
libraries, but they have good reasons for their behavior. Also, the Unix
philosophy of forgiving input is a good one. Also, __import__()ing every
module takes a significant run-time hit, especially if libraries compute
eg. configuration.
The patch utilizes a pre-existing hook in pkgutil to simply quietly add
the module to the output. (Long live lambda.)
|
| msg59852 (view) |
Author: Ka-Ping Yee (ping) |
Date: 2008-01-13 11:32 |
|
Committed the patch in revision 59939.
I'm not clear how it was determined that importing every module was
necessary in order to list the modules or scan their synopsis lines
(this seems to have happened in revision 45510). This can probably
be made more efficient in the future.
|
|
| Date |
User |
Action |
Args |
| 2008-01-13 11:32:19 | ping | set | status: open -> closed resolution: accepted messages:
+ msg59852 |
| 2008-01-12 01:03:30 | akuchling | set | keywords:
+ easy |
| 2007-12-09 02:02:29 | christian.heimes | set | priority: normal assignee: ping nosy:
+ ping keywords:
+ patch versions:
+ Python 3.0 |
| 2007-12-03 16:34:09 | benjhayden | create | |
|