This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients Lasse Schuirmann, steven.daprano
Date 2016-01-02.23:43:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451778215.57.0.723836122029.issue25998@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-01-02 23:43:35steven.dapranosetrecipients: + steven.daprano, Lasse Schuirmann
2016-01-02 23:43:35steven.dapranosetmessageid: <1451778215.57.0.723836122029.issue25998@psf.upfronthosting.co.za>
2016-01-02 23:43:35steven.dapranolinkissue25998 messages
2016-01-02 23:43:34steven.dapranocreate