[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-04 Thread R. David Murray
R. David Murray added the comment: No, I don't think doctest should be made robust against RuntimeErrors. doctest's purpose is to check for bugs, and IMO this is a bug in flask. In particular, it is not doctest that flask is not cooperating with, it is hasattr. It used to be that hasattr wo

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-04 Thread Lasse Schuirmann
Lasse Schuirmann added the comment: Sorry for giving it the wrong category. I personally think both projects should solve this. IMO it would be nice if doctest is robust against modules that for some reason (be they ill designed or not; I guess if you search a lot you find a project that needs

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: doctest doesn't crash -- it is a regular exception, not a crash. "Crash" means "Hard crashes of the Python interpreter – possibly with a core dump or a Windows error box." In other words, a segmentation fault or other low-level crash, not an exception. I'm n

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Lasse Schuirmann
Lasse Schuirmann added the comment: (Closed) issue at the flask repository of this: https://github.com/mitsuhiko/flask/issues/1680 Also IIRC this worked back with Python 3.4 but do not consider this a fact yet. (At least the tests ran on Fedora...) --

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-02 Thread Lasse Schuirmann
New submission from Lasse Schuirmann: You can see this when importing the Flask `request` object in a file that is doctested. The `request` object will throw a RuntimeError when one tries to access any attribute. Doctest tries to `inspect.unwrap` all objects in the file in order to find out if