Skip to content

[3.13] gh-122478: Remove internal frames from tracebacks in REPL (GH-122528) #123227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

cfbolz
Copy link
Contributor

@cfbolz cfbolz commented Aug 22, 2024

Attempt to redo the missing backport of gh-122528, superseding #122817 (which is conflicting now). /cc @pablogsal

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)

pythonGH-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 <[email protected]>
@pablogsal pablogsal force-pushed the backport-e73e7a7-3.13 branch from 3ae8b72 to 37be1c9 Compare August 22, 2024 23:34
@pablogsal pablogsal enabled auto-merge (squash) August 22, 2024 23:51
@pablogsal pablogsal merged commit 30eee22 into python:3.13 Aug 22, 2024
36 checks passed
@serhiy-storchaka
Copy link
Member

What is the difference with #122817?

@cfbolz
Copy link
Contributor Author

cfbolz commented Aug 23, 2024

What is the difference with #122817?

oops, there isn't one. #122817 had a conflict and I didn't know the right github approach to fix the conflicts of a miss-islington backport PR, so I opened this new one instead. I'll close #122817.

@serhiy-storchaka
Copy link
Member

You can use gh pr checkout to get the PR code of other user, change it, commit, and push back. Very handy.

There are some differences between #122817 and this PR, but I do not understand them (there is nothing similar in the main and 3.12 branches). This is why I asked.

@cfbolz
Copy link
Contributor Author

cfbolz commented Aug 23, 2024

You can use gh pr checkout to get the PR code of other user, change it, commit, and push back. Very handy.

thank you!

There are some differences between #122817 and this PR, but I do not understand them (there is nothing similar in the main and 3.12 branches). This is why I asked.

Yes, it took me ages yesterday to find out what happened. Basically the pyrepl PRs were (manually?) backported out of order, and this one was one of the skipped ones. this led to conflicts in the automatic backports, and it's the reason why this PR is different than #122817. but I think we're almost back to a consistent state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants