This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: traceback.py: Allow customization of per-frame line formatting in StackSummary
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ammar2 Nosy List: BTaskaya, ammar2, pablogsal, terry.reedy
Priority: normal Keywords: patch

Created on 2021-07-05 16:47 by ammar2, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27038 merged ammar2, 2021-07-05 17:22
Messages (2)
msg397009 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2021-07-05 16:47
During the implementation of PEP 657, Terry Jan Reedy pointed out that in the format method of traceback.StackSummary there are two roles being fulfilled, there is some logic to handle omitting repeated lines involved in recursive calls and then the core per-frame formatting logic:
 https://github.com/python/cpython/blob/17f94e28882e1e2b331ace93f42e8615383dee59/Lib/traceback.py#L484-L503

To allow the per-line formatting to be overridden easily, these lines should be split into a separate method.
msg397616 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-07-16 12:21
New changeset 8ce3008585feed51bd08ec256a19923940d744d4 by Ammar Askar in branch 'main':
bpo-44569: Decouple frame formatting in traceback.py (GH-27038)
https://github.com/python/cpython/commit/8ce3008585feed51bd08ec256a19923940d744d4
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88735
2021-07-16 12:21:25pablogsalsetmessages: + msg397616
2021-07-16 12:21:24pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-07-05 17:22:39ammar2setkeywords: + patch
stage: patch review
pull_requests: + pull_request25598
2021-07-05 16:47:05ammar2create