]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-122478: Remove internal frames from tracebacks in REPL (GH-122528) (#123227)
authorCF Bolz-Tereick <cfbolz@gmx.de>
Thu, 22 Aug 2024 23:58:05 +0000 (01:58 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2024 23:58:05 +0000 (23:58 +0000)
commit30eee22d3f5b637d2a9536c2d7bf448f6ac14118
tree8fad67da57c5fd989f878d4ee0a42a6e52c969ec
parent5271f8feadc198407449514348c34e3fe77de448
[3.13] gh-122478: Remove internal frames from tracebacks in REPL (GH-122528) (#123227)

Frames of methods in code and codeop modules was show with non-default
sys.excepthook.

Save correct tracebacks in sys.last_traceback and update __traceback__
attribute of sys.last_value and sys.last_exc.
(cherry picked from commit e73e7a7abdc3fed252affcb1629df1b3c8fff2ef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/code.py
Lib/test/test_code_module.py
Misc/NEWS.d/next/Library/2024-07-31-20-43-21.gh-issue-122478.sCU2Le.rst [new file with mode: 0644]