New submission from Ben Hayden: 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.) ---------- components: Demos and Tools, Library (Lib) files: pydocbug.patch messages: 58131 nosy: benjhayden severity: minor status: open title: help('modules') broken by several 3rd party libraries (svn patch attached) type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file8863/pydocbug.patch __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1550> __________________________________
pydocbug.patch
Description: Binary data
_______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com