Message273254
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. |
|
Date |
User |
Action |
Args |
2016-08-21 00:33:16 | pstch | set | recipients:
+ pstch, ncoghlan, cjw296, michael.foord, yselivanov, The Compiler |
2016-08-21 00:33:16 | pstch | set | messageid: <1471739596.58.0.198268442585.issue25532@psf.upfronthosting.co.za> |
2016-08-21 00:33:16 | pstch | link | issue25532 messages |
2016-08-21 00:33:15 | pstch | create | |
|