[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-07-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Benjamin merged this to py3k/3.1 as part of r73623/r73625. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-25 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Applied to 2.7 in r73529 and 2.6 in r73530. Leaving ticket open until I can apply it to 3.1 and 3.2. Thanks for your help, Lucas. -- resolution: - fixed stage: patch review - committed/rejected versions: -Python 2.6, Python

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: I think this patch is ok. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___ ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file14338/issue5230.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-23 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Here is an updated patch that cleans up the unit test (I wasn't correctly restoring sys.path). -- Added file: http://bugs.python.org/file14343/issue5230.patch ___ Python tracker

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-22 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: OK, I finally had time to come back to this, and figured out what I think is a final fix. It passes all the tests we've come up with, at least. Let me know if you see any problems with it, and if not I'll apply it. -- assignee:

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-22 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: Removed file: http://bugs.python.org/file14205/issue5230.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-06 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I've uploaded a new version of the patch and test suite. I wanted a few more test cases but didn't want to litter the test directory with little test files, so I borrowed some techniques from test_import and created the modules to import

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-03 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: I had lots of stuff to do lately, sorry it took me so long to answer. Here is the patch as we intended, but there is a bug yet. What if the non-existent imported module has the same name of the module itself? $ cat pydoc_badimport3.py

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-03 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lukepada...@gmail.com: Removed file: http://bugs.python.org/file14140/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-02 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: Take a look at the output: $ python pydoc.py test.pydoc_badimport2 problem in test.pydoc_badimport2 - type 'exceptions.ImportError': No module named i_dont_exist.neither_do_i This is different from what you expected. How do we change

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I'm sorry, I mistyped. That is the error message I was expecting (it's derived from the one 'import' gives in that case). If the test were like this: elif exc is ImportError and str(value).endswith(path.split('.')[-1]): then I

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks. The unit tests don't pass, though, at least not when I apply the patch to trunk. I get three failures. So the patch isn't correct as it stands. 'path' is the full module path (test.i_am_not_here in the case of one of the test

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: Ok. New patch that passes the unit tests and with a new unit test covering inexistant nested modules. -- Added file: http://bugs.python.org/file14140/pydocs.diff ___ Python tracker

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lukepada...@gmail.com: Removed file: http://bugs.python.org/file14138/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: by the way, I was not acquainted with this unit test thing... sorry -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: No need to apologize, and thank you for taking the time to learn this stuff. (Six months ago I didn't know how the python unit test suite worked either...and I keep learning new things.) For me your new test fails...and it isn't quite

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: I didn't understand what you mean: what should be shown when pydoc tries to generate documentation for a module with the bad import 'import test.i_dont_exist.neither_do_i'? I am not a native english speaker, so please excuse me if you

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It should generate: problem in pydoc_badimport2 - type 'exceptions.ImportError': No module named i_dont_exist If you'd like I can do the final fixup and apply the patch. I'm happy to let you get it working if you want, though, and I

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-06-01 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: Thanks :) It seems that the error message carried by the ImportError object comes from Python/import.c:1504. What should we do: a) Edit Python/import.c b) Change the ImportError object c) Anything else. --

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: I've written a patch. Hope you like it :) -- keywords: +patch nosy: +conf Added file: http://bugs.python.org/file14136/pydocs.diff ___ Python tracker rep...@bugs.python.org

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Thanks :) PEP 8 recommends spaces after commas in a list. Also, we should have a unit tests before we commit the fix. If you feel like writing them that would be most welcome. -- components: +Library (Lib) nosy: +r.david.murray

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: The same patch with whitespaces. Is it ok now? -- Added file: http://bugs.python.org/file14137/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lukepada...@gmail.com: Removed file: http://bugs.python.org/file14136/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: You are still missing a space between 'module' and 'named' ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Changes by Lucas Prado Melo lukepada...@gmail.com: Removed file: http://bugs.python.org/file14137/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-05-31 Thread Lucas Prado Melo
Lucas Prado Melo lukepada...@gmail.com added the comment: A new patch with an unit test and with whitespaces. -- Added file: http://bugs.python.org/file14138/pydocs.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-04-22 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- keywords: +easy priority: - normal versions: +Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-02-16 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5230 ___ ___

[issue5230] pydoc reports misleading failure if target module raises an ImportError

2009-02-12 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: If pydoc is used to try to look up the documentation for a module which does not exist, this is reported reasonably: exar...@charm:~$ pydoc foobarbaz no Python documentation found for 'foobarbaz' exar...@charm:~$