homepage

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.

classification
Title: help('modules') broken by several 3rd party libraries (svn patch attached)
Type: behavior Stage:
Components: Demos and Tools, Library (Lib) Versions: Python 3.0, Python 2.6, Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: ping Nosy List: benjhayden, ping
Priority: normal Keywords: easy, patch

Created on 2007年12月03日 16:34 by benjhayden, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pydocbug.patch benjhayden, 2007年12月03日 16:34
Messages (2)
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) * (Python committer) 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.
History
Date User Action Args
2022年04月11日 14:56:28adminsetgithub: 45891
2008年01月13日 11:32:19pingsetstatus: open -> closed
resolution: accepted
messages: + msg59852
2008年01月12日 01:03:30akuchlingsetkeywords: + easy
2007年12月09日 02:02:29christian.heimessetpriority: normal
assignee: ping
nosy: + ping
keywords: + patch
versions: + Python 3.0
2007年12月03日 16:34:09benjhaydencreate

AltStyle によって変換されたページ (->オリジナル) /