New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
If the number of frames in a traceback exceeds sys.tracebacklimit (which defaults to 1000), any remaining frames are silently dropped. See https://docs.python.org/3.10/library/sys.html#sys.tracebacklimit. This is confusing to users. We should print some indication like "N additional stack frames not shown". Here are some specific ideas: - tracebacklimit <= 0 is documented as dropping the whole traceback. In that case, we don't need too print any message. - It may be expensive to compute a complete count. Perhaps we can count frames up to 2 * tracebacklimit, and just say "Many additional stack frames not shown". - The C implementation is in tb_print_internal() in traceback.c, and the Python one in _extract_from_extended_frame_gen in traceback.py. ---------- components: Interpreter Core messages: 414674 nosy: Jelle Zijlstra, gvanrossum, iritkatriel priority: normal severity: normal status: open title: Print an indication if traceback exceeds sys.tracebacklimit type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46949> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com