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 not convinced that this is a problem with doctest, it looks to me like a 
broken-by-design flaw in requests. If you try to access an attribute that 
doesn't exist, you should get AttributeError, not RuntimeError. I don't 
understand the justification given on the requests tracker for why the 
attribute access fails, but I would expect that any exception other than 
AttributeError, or a subclass of such, is a clear bug in requests.

I don't think it is doctest's responsibility to have special handling for an 
ill-designed proxy class, but I'll hold off closing the ticket for a few days 
in case anyone makes a good argument for why this is a doctest bug.

----------
nosy: +steven.daprano
type: crash -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25998>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to