Description of problem: Upon using pydoc -k 'different strings' i get what is below: $ pydoc -k string docstrings - Module documentation StringIO - File-like objects that read from or write to a string buffer. UserString - A user-defined wrapper around string objects distutils.versionpredicate - Module for parsing and testing package version predicate strings. doctest - Module doctest -- a framework for running examples in docstrings. encodings.string_escape - Python 'escape' Codec string - A collection of string operations (most are no longer used). stringold - Common string manipulations. stringprep - Library that exposes various tables found in the StringPrep RFC 3454. cStringIO OpenGL.GL.GREMEDY.string_marker Traceback (most recent call last): File "/usr/bin/pydoc", line 5, in <module> pydoc.cli() File "/usr/lib/python2.5/pydoc.py", line 2189, in cli apropos(val) File "/usr/lib/python2.5/pydoc.py", line 1887, in apropos ModuleScanner().run(callback, key) File "/usr/lib/python2.5/pydoc.py", line 1852, in run for importer, modname, ispkg in pkgutil.walk_packages(): File "/usr/lib/python2.5/pkgutil.py", line 125, in walk_packages for item in walk_packages(path, name+'.', onerror): File "/usr/lib/python2.5/pkgutil.py", line 110, in walk_packages __import__(name) File "/usr/lib/python2.5/site-packages/OpenGL/WGL/__init__.py", line 3, in <module> wglUseFontBitmaps = wglUseFontBitmapsW NameError: name 'wglUseFontBitmapsW' is not defined Version-Release number of selected component (if applicable): Python 2.5.1 How reproducible: Easily, everytime i do use pydoc -k 'anything' results in the same thing Steps to Reproduce: 1.pydoc -k 'anything' 2. 3. Actual results: The above explains it well enough I think. Expected results: Additional info:
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.
Reopening this because pydoc still doesn't gracefully handle offensive modules, i.e. those that insist on doing stuff when imported, which fails in some situations: --- 8< ---------- nils@gibraltar:~> rpm -q python python-2.6.2-2.fc12.x86_64 nils@gibraltar:~> pydoc -k string StringIO - File-like objects that read from or write to a string buffer. UserString - A user-defined wrapper around string objects [...] dm.c: 1640: not running as root returning empty list [...] (process:6997): Gdk-CRITICAL **: gdk_keymap_get_for_display: assertion `GDK_IS_DISPLAY (display)' failed (process:6997): Gdk-CRITICAL **: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed ** (process:6997): CRITICAL **: egg_keymap_resolve_virtual_modifiers: assertion `GDK_IS_KEYMAP (keymap)' failed [...] gtcache.gettext: not initialized for string "Ok" gtcache.gettext: not initialized for string "Close" gtcache.gettext: not initialized for string "Cancel" [...] Traceback (most recent call last): File "/usr/bin/pydoc", line 5, in <module> pydoc.cli() File "/usr/lib64/python2.6/pydoc.py", line 2264, in cli apropos(val) File "/usr/lib64/python2.6/pydoc.py", line 1962, in apropos ModuleScanner().run(callback, key) File "/usr/lib64/python2.6/pydoc.py", line 1927, in run for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror): File "/usr/lib64/python2.6/pkgutil.py", line 110, in walk_packages __import__(name) File "/usr/lib64/python2.6/site-packages/parted/__init__.py", line 28, in <module> from _ped import AlignmentException RuntimeError: pyparted requires root access -- >8 ---------- Running "pydoc -k" should catch all exceptions while importing modules, and display failed modules _after_ all positive keyword matches (not in between). It also should redirect stdout/stderr while importing so error message e.a. don't clutter up the list of hits.
Renaming from: "pydoc -k" yields "NameError: name 'wglUseFontBitmapsW' is not defined" so that this bug can be a more general bug about improving the robustness of "pydoc -k" in the face of broken modules. I've filed this issue in the upstream tracker here: http://bugs.python.org/issue7425 with a first pass at a patch.
*** Bug 447779 has been marked as a duplicate of this bug. ***
*** Bug 561419 has been marked as a duplicate of this bug. ***
*** Bug 594686 has been marked as a duplicate of this bug. ***
*** Bug 596370 has been marked as a duplicate of this bug. ***
Adding my workaround; building into rawhide as python-2.6.5-12.fc14
I'm confused. The upstream bug tracker comments seemed positive. Is this not going in upstream?
(In reply to comment #11) > I'm confused. The upstream bug tracker comments seemed positive. Is this not > going in upstream? Upstream patch review can take a while, alas. Given that the patch is trivial and that this issue is continuing to affect people and generate bug reports, I feel applying the patch downstream is appropriate.
*** Bug 639125 has been marked as a duplicate of this bug. ***
*** Bug 649707 has been marked as a duplicate of this bug. ***