[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-09 Thread Joe Wells
Joe Wells added the comment: Some quick comments on Martin's pull request. 1. The changes are sufficient to let the user make things work the way it is requested that they work and anyone who does not start using the new format_locals parameter will get the old behavior. 2. A side comment

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-28 Thread Joe Wells
Joe Wells added the comment: 1. As background, it is worth remembering that a major motivation for why FrameSummary.__init__ stringifies the local variable values in its parameter locals is to prevent the resulting data structure from keeping those values live. This enables them

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-20 Thread Joe Wells
Joe Wells added the comment: In the hopes of convincing someone to install a fix to this bug, I will mention a few additional points. When I mention “the capture_locals feature”, I mean calls of the form traceback.TracebackException(..., capture_locals=True

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-20 Thread Joe Wells
Joe Wells added the comment: Andrei, thanks very much for the pointer to bug/issue https://bugs.python.org/issue39228. I had not noticed the earlier comment by Irit pointing to that bug. (Is there some way to merge bugs so that someone visiting one of the bugs will see the merged stream

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-20 Thread Joe Wells
Joe Wells added the comment: I'm sorry Andrei: I misread your alteration of my example and misunderstood its purpose. For anyone else reading these messages: In my most recent comment above, please ignore the part of my comment about Andrei's example. So yes, Andrei, that is how people

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-20 Thread Joe Wells
Joe Wells added the comment: Here are my thoughts inspired by Andrei's insightful comments. 1. In response to the major issue Andrei raises, I agree that it is desirable that repr would never raise an exception. The reasons Andrei mentions seem quite correct to me. However, I think

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-19 Thread Joe Wells
Joe Wells added the comment: I would like to request that this bug be repopened and fixed. I've changed (or at least tried to change, I'm not sure if it will let me) the title of the bug to point out that the failure happens in FrameSummary.__init__. It does not happen