GNOME Bugzilla – Bug 573845
Typing exit() or quit() in the IPython console hangs the application
Last modified: 2020-11-23 23:23:38 UTC
Steps to reproduce: 1. type exit() or quit() in the IPython console 2. 3. Stack trace: Other information: I used ipython_view.py to embed an IPython console in a stand-alone gtk window (using directions from the IPython site) and the same thing happens. Is there a way to make these functions call a specified function (destroy the window)? Also, an interesting effect, while the program is frozen, if it is launched from a console, you can go back to the console and hit ctrl+D, and that unfreezes it.
Created attachment 130102 [details] [review] Temporary fix This patch simply overwrites "exit" and "quit" with empty functions. In the log run the solution is probably to remove these symbols altogether, from __builtins__, but I think ipython may have it's own custom version because that confirmation text comes up. Need to snoop around in ipython code for that...
Review of attachment 130102 [details] [review]: This patch does prevent the hang. I suppose the long term solution would be to track everything added to the gobject idle loop and remove them gracefully or is do we have a handle on accerciser's main window where we could call it's _quit method?
Committed this patch to trunk commit 919cd6ab31191f6d9dd0c37211a2859890410807 Author: Brian Nitz <brian.nitz@oracle.com> Date: Fri Jan 21 17:53:38 2011 +0000
Created attachment 191752 [details] [review] Removes quit() and exit() from IPython.Magic and __builtins__ This solution removes references for quit() and exit() from __builtins__ and IPython Magic. There's no difference in typing quit(), quit, exit, exit() or foo in IPython Console. They're just names without previous definition.
I can't reproduce this bug, don't know if I need some extra info for to reproduce it. Aline, can you still reproduce it with master? Thanks in advance!
So are the patches attached to this bug needs-work? Or are some committed?
setting to NEW as per comment #6.
They were committed.