You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2008-01-13.11:32:19.468>created_at=<Date2007-12-03.16:34:09.201>labels= ['easy', 'type-bug', 'library']
title="help('modules') broken by several 3rd party libraries (svn patch attached)"updated_at=<Date2008-01-13.11:32:19.467>user='https://bugs.python.org/benjhayden'
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.)
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: