Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commented Aug 8, 2024

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 e73e7a7)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com

…onGH-122528) 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 e73e7a7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
# over self.write
self._call_excepthook(type, value, tb)
try:
typ, value, tb=sys.exc_info()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These days we do exc = sys.exception() and then use exc.__traceback__ and type(exc).

Copy link
Contributor

@cfbolzcfbolz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@cfbolz
Copy link
Contributor

cfbolz commented Aug 23, 2024

backport happened in #123227

@cfbolzcfbolz closed this Aug 23, 2024
@miss-islingtonmiss-islington deleted the backport-e73e7a7-3.13 branch January 2, 2026 18:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@miss-islington@cfbolz@iritkatriel@serhiy-storchaka