[issue24252] IDLE removes elements from tracebacks.

Terry J. Reedy report at bugs.python.org
Mon Jun 8 06:25:18 CEST 2015


Terry J. Reedy added the comment:

Did you test my proposed patch?  I am reluctant to make major changes in the absence of either documentation for why the code is as it is or test cases.  So I do not know about trimming top versus bottom and the examples intended to show both are needed.  I am not even sure that only top and bottom are 'correct'.

That said, paying attention to the complete file name, or at least the prior directory ('idlelib' for idle files), seems plausible.  But we have to attend to '/' versus Windows' '\'.

"The only situation that this function would behave wrongly is when someone launches IDLE from the shell (Why would they do that?)"

Which shell?  I sometimes start Idle from both command line shell and python shell, for different reasons.

I was already aware that pdb and Idle might not be the only things to subclass bdb (with bugs). I think the patch should be 'inverted' to only add bdb to the exclude list if idlelib/RemoteDebugger.py (or ...\...) is present in the traceback. 

The current code was moved from Executive.runcode 2003-05-08 by KBK.
"2. run.py: move exception printing to toplevel to allow access from main()"
A couple of months before, the exclude list was shorter:
   exclude = ("run.py", "rpc.py", "RemoteDebugger.py", "bdb.py")
I did not find the reason for adding threading and queue.
A little before, the exception printing code was in rpc.py. I will do more history tracing later.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24252>
_______________________________________


More information about the Python-bugs-list mailing list