Repository navigation
gh-135511 Fixed NameError and AttributeError lack of the message in IDLE - #135526
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
NameError and AttributeError lack of the message in IDLENameError and AttributeError lack of the message in IDLE
|
I use blurb to create a |
terryjreedy
left a comment
There was a problem hiding this comment.
To add a test, I think if might be sufficient to add the following tuple to the end of data in test_idle.test_run.ExceptionTest.
('raise NameError("123\n456")', NameError, "123\n456\n"),
If you want me to make changes and test, I will, but I need sleep now.
|
The hint process is rather fragile. Modifying |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @terryjreedy: please review the changes made to this pull request. |
|
To add the test, I have to add a new default for |
4685784 to
1b644d6
Compare
|
I make the change clearer now. |
|
I will re-review this and test it live. |
|
@terryjreedy All three items from my July review are addressed and the PR is approved on my side; the only blocker is your "changes requested" from June 2025. Could you re-review (or dismiss the old review) so this can be merged? The TSan failure on the last run is unrelated to this change. |
|
I am trouble making a branch to test. Earlier Success. Tested, switched to main, deleted. But for this issue/PR: Don't remember ever seeing this. Retry gave same rejected line. Re-pull, rebuild, try again, same. EDIT: I tried another PR I have not yet look at locally and it created and switch as usual. |
|
Thanks @Locked-chess-official for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
Sorry, @Locked-chess-official and @terryjreedy, I could not cleanly backport this to |
|
Sorry, @Locked-chess-official and @terryjreedy, I could not cleanly backport this to |
|
GH-158272 is a backport of this pull request to the 3.15 branch. |
|
GH-158275 is a backport of this pull request to the 3.14 branch. |
|
GH-158276 is a backport of this pull request to the 3.13 branch. |
|
|
…ibuteError (GH-135526) (#158272) gh-135511 Fixed truncated exception message for Name- and AttributeError (GH-135526) Only the last line of multiline error messages was displayed. --------- (cherry picked from commit 421c411) Co-authored-by: Locked-chess-official <13140752715@163.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
NameErrorhas different actions when be raised in IDLE #135511