[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

Irit Katriel report at bugs.python.org
Thu Jan 7 19:41:45 EST 2021


Irit Katriel <iritkatriel at yahoo.com> added the comment:

So, we have a contact chain of length almost equal to the recursion limit, which is too much to process recursively in python (in c it does work, hence the difference between the outputs of the OP's two scripts).

The PR removes recursion from TracebackException (in constructor as well as in format()).  The code is less readable and I'm not sure this case is worth that. Should we instead truncate the output, ie add a limit on the recursion depth?  (note that in this case this would remove the last "recursion depth exceeded" exception and show only some of the repetitive ones).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42848>
_______________________________________


More information about the Python-bugs-list mailing list