[Python-Dev] Re: review for doctest fix: bpo-35753

2020-11-25 Thread Alfred Perlstein
On 11/6/20 6:13 PM, Steven D'Aprano wrote: For the benefit of others, the problem is that `unittest.mock.call.__wrapped__` generates a new object, which in turn has a dynamic `__wrapped__` attribute, which does the same, thus generating an infinite chain of *distinct* proxies. Being distinct pr

[Python-Dev] Re: review for doctest fix: bpo-35753

2020-11-06 Thread Steven D'Aprano
For the benefit of others, the problem is that `unittest.mock.call.__wrapped__` generates a new object, which in turn has a dynamic `__wrapped__` attribute, which does the same, thus generating an infinite chain of *distinct* proxies. Being distinct proxy objects defeats the loop detection algo