Skip to content
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

IDLE - Remove use of deprecated sys.last_xyzs in stackviewer #102832

Closed
terryjreedy opened this issue Mar 19, 2023 · 0 comments
Closed

IDLE - Remove use of deprecated sys.last_xyzs in stackviewer #102832

terryjreedy opened this issue Mar 19, 2023 · 0 comments
Assignees

Comments

@terryjreedy
Copy link
Member

terryjreedy commented Mar 19, 2023

#102778 deprecated sys.last_type/value/traceback in favor of sys.last_exc, added in 3.12. We cannot access system system-set sys.last_exc in 3.10 and 3.11, but we can set it from sys.last_value or sys.exec_info()[1] and nearly never set or otherwise access the deprecated values. The except is sys.last_type, sys.last_value, sys.last_traceback = excinfo in run.print_exception, which should remain as long as the REPL does the same (add comment). Any sys.last_exc = sys.last_value statements can be deleted in June 2024. There is a draft issue for this.

The files to be patched are run (where it handles exceptions or stackviewer), pyshell (where it starts stackviewer), stackviewer, and test_stackviewer. This diff has the relevant locations.

Linked PRs

@terryjreedy terryjreedy converted this from a draft issue Mar 19, 2023
@terryjreedy terryjreedy self-assigned this Mar 19, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Apr 7, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Apr 7, 2023
@terryjreedy terryjreedy changed the title IDLE - Reduce use of deprecated sys.last_xyzs IDLE - Remove use of deprecated sys.last_xyzs in stackviewer Apr 19, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 8, 2023
…ackviewer (pythonGH-103339)

(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 8, 2023
…ackviewer (pythonGH-103339)

(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <[email protected]>
terryjreedy added a commit to terryjreedy/cpython that referenced this issue Jun 8, 2023
Use 'last_exc' instead of 'last_value' in 3.12/3.
terryjreedy pushed a commit that referenced this issue Jun 8, 2023
…tackviewer (GH-103339) (#105527)

gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <[email protected]>
terryjreedy pushed a commit that referenced this issue Jun 8, 2023
…tackviewer (GH-103339) (#105526)

gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339)
(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <[email protected]>
terryjreedy added a commit that referenced this issue Jun 8, 2023
Use 'last_exc' instead of 'last_value' in 3.12/3.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 8, 2023
Use 'last_exc' instead of 'last_value' in 3.12/3.
(cherry picked from commit bb3454c)

Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this issue Jun 8, 2023
gh-102832: IDLE - update stackviewer open (GH-105528)

Use 'last_exc' instead of 'last_value' in 3.12/3.
(cherry picked from commit bb3454c)

Co-authored-by: Terry Jan Reedy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant