bpo-38792: Remove IDLE shell calltip before new prompt.#17150
Conversation
Calltips should be removed if a KeyboardInterrupt occurs.
|
Hi Zack, thanks for this! This doesn't go far enough, actually; we should make sure to close the calltip in other cases too, such as restarting the shell or hitting return to running a statement / block. It is a bit hairy to see where the best place to add this is. Let me know if you're interested in doing more work on this and testing various edge cases. |
terryjreedy
left a comment
There was a problem hiding this comment.
I tested interrupts and restarts before, during, and after calltips. Before and after had no new problems and during now works properly. I also tested some in editor. Zack, thanks for report and initial fix. I plan to merge tomorrow.
@taleinat If you find a way to execute with Enter and have calltip persist, we can try to fix in another PR, making sure to not regress in editor.
|
Even with this fix, it is still easy and common to get a calltip staying open in other ways. For example, hitting Enter in the shell with a calltip open and a syntax error, as in the following image: Removing any open call-tips in |
This looks to be working very nicely. I've pushed this change into this PR, I hope you like it! |
|
I got the same with I like handling this in one place. Among other reasons, Zack originally used |
|
Thanks @ZackerySpytz for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
|
@terryjreedy: Please replace |
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-18287 is a backport of this pull request to the 3.8 branch. |
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
GH-18288 is a backport of this pull request to the 3.7 branch. |
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa3) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com>

Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart..
https://bugs.python.org/issue38792