Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last_traceback#102779
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…value, sys.last_traceback
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
AlexWaygood left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
A few more docs nits
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Core and Builtins/2023-03-17-13-43-34.gh-issue-102778.ANDv8I.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
bedevere-bot commentedMar 17, 2023
🤖 New build scheduled with the buildbot fleet by@iritkatriel for commite1cc312 🤖 If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again. |
gvanrossum left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn’t pdb.pm() be changed to use sys.last_exc?
iritkatriel commentedMar 17, 2023
Yes, idlelib too. But I'm not sure whether we do that now or in 3.14 when it won't interfere with backports. |
Uh oh!
There was an error while loading.Please reload this page.
gvanrossum commentedMar 17, 2023
I would do it now, but look both (in case user code sets one or the other): if sys.last_exc exists, use that, else if sys.last_(type,value,traceback) exist, use those, else fail. Then in the future we can delete the code checking for the latter. |
bedevere-bot commentedMar 17, 2023
🤖 New build scheduled with the buildbot fleet by@iritkatriel for commit2ce2c26 🤖 If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again. |
terryjreedy commentedMar 19, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Please revert the changes to idlelib. (Why the rush before I could respond.) I dislike the awkward workaround changes, which IDLE does not need, and they cannot be backported. I would much prefer to make more extensive changes that get rid of nearly all references to the deprecated attributes and whichcan be backported. For instance, in test_stackviewer setup,replace Let me request again (from the previous PR that was closed) that idlelib changes be put in a separate PR that I can review and backport. |
iritkatriel commentedMar 19, 2023
Sorry, will revert and fix. |
iritkatriel commentedMar 19, 2023
If a user tries to access sys.last_type or sys.last_traceback then it won't work. Is this not an issue? |
terryjreedy commentedMar 19, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, |
…value,sys.last_traceback (python#102779)
…value,sys.last_traceback (python#102779)
Uh oh!
There was an error while loading.Please reload this page.