Browse Source
bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
The recursive frame pruning code always undercounted the number of elided frames by one. That is, in the "[Previous line repeated N more times]" message, N would always be one too few. Near the recursive pruning cutoff, one frame could be silently dropped. That situation is demonstrated in the OP of the bug report. The fix is to start the identical frame counter at 1.pull/9143/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 96 additions and 26 deletions
-
61Lib/test/test_traceback.py
-
29Lib/traceback.py
-
2Misc/NEWS.d/next/Core and Builtins/2018-09-05-22-56-52.bpo-34588.UIuPmL.rst
-
30Python/traceback.c
@ -0,0 +1,2 @@ |
|||
Fix an off-by-one in the recursive call pruning feature of traceback |
|||
formatting. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue