Author pstch
Recipients The Compiler, cjw296, michael.foord, ncoghlan, pstch, yselivanov
Date 2016-08-21.00:33:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471739596.58.0.198268442585.issue25532@psf.upfronthosting.co.za>
In-reply-to
Content
This patch blacklists `__wrapped__` (using the same form as the first comment, with a more explicit exception message) in `unittest.mock._Call.__getattr__`. 

I also documented the change and added a tests that checks `assertFalse(hasattr(call, '__wrapped__'))`.

I did not make the same change in the `Mock` class, as its instances are not usually set at module level (which is what triggers this bug in doctests, as they run `inspect.unwrap` on module attributes).

I'd like to note that this regression can be nasty for some CI systems : it makes the Python interpreter infinitely allocate memory (as it's not a recursion error) and crashes any host that doesn't limit virtual memory allocation.
History
Date User Action Args
2016-08-21 00:33:16pstchsetrecipients: + pstch, ncoghlan, cjw296, michael.foord, yselivanov, The Compiler
2016-08-21 00:33:16pstchsetmessageid: <1471739596.58.0.198268442585.issue25532@psf.upfronthosting.co.za>
2016-08-21 00:33:16pstchlinkissue25532 messages
2016-08-21 00:33:15pstchcreate