Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help('modules') broken by several 3rd party libraries (svn patch attached) #45891

Closed
benjhayden mannequin opened this issue Dec 3, 2007 · 2 comments
Closed

help('modules') broken by several 3rd party libraries (svn patch attached) #45891

benjhayden mannequin opened this issue Dec 3, 2007 · 2 comments
Labels
easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@benjhayden
Copy link
Mannequin

benjhayden mannequin commented Dec 3, 2007

BPO 1550
Files
  • pydocbug.patch
  • 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 = None
    closed_at = <Date 2008-01-13.11:32:19.468>
    created_at = <Date 2007-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 = <Date 2008-01-13.11:32:19.467>
    user = 'https://bugs.python.org/benjhayden'

    bugs.python.org fields:

    activity = <Date 2008-01-13.11:32:19.467>
    actor = 'ping'
    assignee = 'ping'
    closed = True
    closed_date = <Date 2008-01-13.11:32:19.468>
    closer = 'ping'
    components = ['Demos and Tools', 'Library (Lib)']
    creation = <Date 2007-12-03.16:34:09.201>
    creator = 'benjhayden'
    dependencies = []
    files = ['8863']
    hgrepos = []
    issue_num = 1550
    keywords = ['patch', 'easy']
    message_count = 2.0
    messages = ['58131', '59852']
    nosy_count = 2.0
    nosy_names = ['ping', 'benjhayden']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue1550'
    versions = ['Python 2.6', 'Python 2.5', 'Python 3.0']

    @benjhayden
    Copy link
    Mannequin Author

    benjhayden mannequin commented Dec 3, 2007

    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.)

    @benjhayden benjhayden mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 3, 2007
    @akuchling akuchling added the easy label Jan 12, 2008
    @ping
    Copy link
    Mannequin

    ping mannequin commented Jan 13, 2008

    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.

    @ping ping mannequin closed this as completed Jan 13, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant