[3.12] gh-102832: IDLE - remove use of deprecated sys.last_xyzs for stackviewer (GH-103339) (#105526)

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

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-06-08 14:57:33 -07:00 committed by GitHub
parent b08ea9a561
commit f565fed548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 51 deletions

View file

@ -622,7 +622,7 @@ class Executive:
def stackviewer(self, flist_oid=None):
if self.user_exc_info:
typ, val, tb = self.user_exc_info
_, exc, tb = self.user_exc_info
else:
return None
flist = None
@ -630,9 +630,8 @@ class Executive:
flist = self.rpchandler.get_remote_proxy(flist_oid)
while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]:
tb = tb.tb_next
sys.last_type = typ
sys.last_value = val
item = stackviewer.StackTreeItem(flist, tb)
exc.__traceback__ = tb
item = stackviewer.StackTreeItem(exc, flist)
return debugobj_r.remote_object_tree_item(item)