[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2011-09-04 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +Christian.S..Perone, ned.deily
versions: +Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2011-01-03 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: unit test needed - patch review
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-10-14 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

I notice this issue is in stage unit test needed.

It's not clear to me how to add a unit test for this: one idea I had is to 
create a broken module in some subdir somewhere, and invoke pydoc -k as a 
subprocess with PYTHONPATH containing the extra subdir (and assert no traceback 
seen in stderr of the child).

Does that sound sane?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-10-14 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Yes, and I can't think of any other way to approach it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-04-09 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Is it a dup of issue1785?

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-04-09 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It doesn't look like it is the same bug to me.  This one is more general.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2010-04-08 Thread Daniel Diniz

Daniel Diniz aja...@gmail.com added the comment:

Nice improvement. This would also solve the help(), modules brokenness, right?

--
nosy: +ajaksu2
priority:  - normal
stage:  - test needed
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7425] [PATCH] Improve the robustness of pydoc -k in the face of broken modules

2009-12-02 Thread Dave Malcolm

New submission from Dave Malcolm dmalc...@redhat.com:

I see occasional failures where a broken module prevents pydoc -k (apropos) 
from working.

Examples of failures (from our downstream bug tracker) are:
https://bugzilla.redhat.com/show_bug.cgi?id=461419 : pydoc -k yields 
NameError: name 'wglUseFontBitmapsW' is not 
defined
(a broken OpenGL/WGL/__init__.py module)

https://bugzilla.redhat.com/show_bug.cgi?id=447779 : pydoc turbogears doesn't 
work
(broken TurboGears module)

https://bugzilla.redhat.com/show_bug.cgi?id=246212 : pydoc -k searchterm 
MemoryError. permission denied.
(module only intended to be importable as root user)

In each case one or more of the many modules on the system are broken, and 
importing them leads to an exception being 
raised that isn't ImportError.

In each case, the exception bubbles up through the pydoc call ands leads to it 
exiting.

Obviously the broken modules should be fixed, but it seems to me that pydoc 
could be more robust against this situation.

I'm attaching a simple patch which makes pydoc -k more robust against this 
situation, by silently discarding all 
exceptions raised by imported modules.

How does this look?

One downstream bug report requested taking it further:
 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.  
to deal with broken modules that spew error messages (this was in 
https://bugzilla.redhat.com/show_bug.cgi?id=461419#c3 
); I've seen some do it to stdout and some to stderr.

How does this sound?  I can try to update the patch for this too, if this 
sounds sane to you.

--
components: Demos and Tools
files: make-pydoc-more-robust-001.patch
keywords: patch
messages: 95918
nosy: dmalcolm
severity: normal
status: open
title: [PATCH] Improve the robustness of pydoc -k in the face of broken 
modules
versions: Python 2.6
Added file: http://bugs.python.org/file15443/make-pydoc-more-robust-001.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7425
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com