[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-10-06 Thread Ned Deily
Ned Deily added the comment: Thanks for your suggested code and test. Somewhat different fixes to pkgutil have been added by the changes for Issue7367 and a necessary backport of a fix for pydoc from 3.x to 2.7 was made for Issue7425. With these fixes in place, pydoc for 3.3.0, 3.2.3, and 2.

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-08-05 Thread Ned Deily
Changes by Ned Deily : -- assignee: -> ned.deily nosy: +ned.deily versions: -Python 3.1 ___ Python tracker ___ ___ Python-bugs-list

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-27 Thread Ben Okopnik
Ben Okopnik added the comment: Whoops... with all of that, I just realized that this bug should be filed against pkgutil, not pydoc (pydoc, of course, calls pkgutil to do the path resolution, which is where this crash occurs.) My bad. >>> import pkgutil >>> inst = pkgutil.ImpImporter(path='/t

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-27 Thread Ben Okopnik
Ben Okopnik added the comment: Trivial fix: please see attached. As to test_pydoc.py, I don't know the system well enough to fiddle with it, but something like this should work (untested): def test_unreadable_dir(self): ''' pydoc should handle unreadable subdirs gracefully '''

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-27 Thread Éric Araujo
Éric Araujo added the comment: The script is bugged, since whereis prefixes its output with its argument (i.e. here “pydoc: ”). It’s not a concern anyway: branches open for bugfixes are 2.7, 3.1, 3.2 and 3.3, so when we have a test (preferably as a patch to test_pydoc.py, see http://docs.pyt

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-27 Thread Ben Okopnik
Ben Okopnik added the comment: Here's a test that should exercise every version of "pydoc" installed on the system: mkdir -p /tmp/foo/bar; cd /tmp/foo; chmod 0 bar for n in `whereis -b pydoc`; do echo " $n "; $n modules; done Tested under Ubuntu with bash and sh; should work fine with

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-27 Thread Éric Araujo
Changes by Éric Araujo : -- components: +Library (Lib) -Demos and Tools nosy: +eric.araujo stage: -> test needed versions: -Python 2.5, Python 2.6, Python 3.4 ___ Python tracker __

[issue11914] pydoc modules/help('modules') crash in dirs with unreadable subdirs

2011-04-23 Thread Ben Okopnik
New submission from Ben Okopnik : Long-standing problem (happens in every Python version I've tested). The usual situation is when invoking Python (and then "help('modules')") or "pydoc modules" in /tmp, but also happens when located anywhere with unreadable subdirs: ben@Jotunheim:~$ mkdir /t