After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573845 - Typing exit() or quit() in the IPython console hangs the application
Typing exit() or quit() in the IPython console hangs the application
Status: RESOLVED FIXED
Product: accerciser
Classification: Applications
Component: plugins
1.4.x
Other All
: Normal critical
: ---
Assigned To: Eitan Isaacson
Accerciser Developers
Depends on:
Blocks:
 
 
Reported: 2009-03-03 00:49 UTC by Brian
Modified: 2020-11-23 23:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Temporary fix (424 bytes, patch)
2009-03-05 09:43 UTC, Eitan Isaacson
none Details | Review
Removes quit() and exit() from IPython.Magic and __builtins__ (1.72 KB, patch)
2011-07-11 18:45 UTC, Aline Bessa
none Details | Review

Description Brian 2009-03-03 00:49:54 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.
Comment 1 Eitan Isaacson 2009-03-05 09:43:10 UTC
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...
Comment 2 Brian Nitz 2011-01-18 12:17:07 UTC
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?
Comment 3 Brian Nitz 2011-01-21 17:57:14 UTC
Committed this patch to trunk
commit 919cd6ab31191f6d9dd0c37211a2859890410807
Author: Brian Nitz <brian.nitz@oracle.com>
Date:   Fri Jan 21 17:53:38 2011 +0000
Comment 4 Aline Bessa 2011-07-11 18:45:52 UTC
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.
Comment 5 Javier Hernández 2011-09-19 00:56:53 UTC
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!
Comment 6 Tobias Mueller 2012-09-10 20:48:39 UTC
So are the patches attached to this bug needs-work? Or are some committed?
Comment 7 Tobias Mueller 2013-01-07 23:41:10 UTC
setting to NEW as per comment #6.
Comment 8 Samuel Thibault 2020-11-23 23:23:38 UTC
They were committed.