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

gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer #103339

Merged
merged 8 commits into from
Jun 8, 2023

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Apr 7, 2023

Pass the exception as an argument instead of as a sys attribute.

@iritkatriel
Copy link
Member Author

I see - the tests are skipped on Mac so I didn’t see them fail. I’ll try later on windows and fix this.

@iritkatriel iritkatriel added skip news stdlib Python modules in the Lib dir labels Apr 7, 2023
Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

Order of PRs: (edited)

  1. Set sys.last_exc in run print_exception. gh-102778: IDLE - make sys.last_exc available in Shell after traceback #103314 (Done)
  2. Patch pyshell open_stack_viewer (comment on StackBrowser/stackbrowser)
  3. Apply this with changes and additional changes to open_stack_viewer and run-stackviewer and maybe new unittests.

Now working on 2 and 3.

The comments make a bit more sense when read in order on the diff page.

Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/stackviewer.py Outdated Show resolved Hide resolved
Lib/idlelib/idle_test/test_stackviewer.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@terryjreedy terryjreedy changed the title gh-102832: [idle] reduce use of deprecated sys.last_xyzs gh-102832: IDLE - reduce use of deprecated sys.last_xyzs Apr 7, 2023
@terryjreedy terryjreedy self-assigned this Apr 7, 2023
@terryjreedy terryjreedy changed the title gh-102832: IDLE - reduce use of deprecated sys.last_xyzs gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer Apr 19, 2023
@terryjreedy
Copy link
Member

terryjreedy commented Apr 21, 2023

I am reversing 2. patch open_stack_viewer and 3. everything else by including changing open_stack_viewer to pass sys.last_value, which is valid in 3.11 and 3.12.


After merging this, I will patch main and 3.12 only to pass last_exc instead of last_value, thus removing, I believe, the last use of a deprecated value.


@iritkatriel
Copy link
Member Author

Sorry, this seems to have dropped off my radar somehow. I'll update it now.

@iritkatriel
Copy link
Member Author

Actually, are you working on this? (You seem to indicate so in #103339 (review)).

@terryjreedy
Copy link
Member

I have a partly done branch. Will make this a priority tomorrow.

@terryjreedy terryjreedy marked this pull request as draft June 8, 2023 01:21
@terryjreedy terryjreedy added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Jun 8, 2023
@terryjreedy terryjreedy marked this pull request as ready for review June 8, 2023 03:48
@terryjreedy
Copy link
Member

Assuming CI passes, I believe ready now. Will recheck tomorrow.

@iritkatriel iritkatriel merged commit 3ee921d into python:main Jun 8, 2023
@miss-islington
Copy link
Contributor

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2023
…ackviewer (pythonGH-103339)

(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2023
…ackviewer (pythonGH-103339)

(cherry picked from commit 3ee921d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-bot
Copy link

GH-105526 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jun 8, 2023
@bedevere-bot
Copy link

GH-105527 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 8, 2023
terryjreedy pushed a commit that referenced this pull request 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 <1055913+iritkatriel@users.noreply.github.com>
terryjreedy pushed a commit that referenced this pull request 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 <1055913+iritkatriel@users.noreply.github.com>
@iritkatriel iritkatriel deleted the stackbrowser branch July 25, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news stdlib Python modules in the Lib dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants