bpo-25532: Protect against infinite loops in inspect.unwrap() (#1717)
Some objects (like test mocks) auto-generate new objects on attribute access, which can lead to an infinite loop in inspect.unwrap(). Ensuring references are retained to otherwise temporary objects and capping the size of the memo dict turns this case into a conventional exception instead.
T
Thomas Kluyver committed
f9169ce6b48c7cc7cc62d9eb5e4ee1ac7066d14b
Parent: e377416
Committed by Nick Coghlan <ncoghlan@gmail.com>
on 5/23/2017, 3:27:52 AM