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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show() blocks in pylab mode with ipython 0.10.1 #185
Comments
Ouch, it seems we have a nasty regression with GTK, which happens to be the default on linux. Could you try starting it with ipython --pylab --qthread or ipython --pylab --q4thread To use Wx or Qt instead? Let us know how that goes, and if it works OK, it may be a necessary workaround until we find/fix the bug. |
Wx and Qt/Qt4 work fine. |
OK, thanks for the report. We'll try to fix the gtk bug as soon as possible, though. In the meantime, wx/qt will have to be the workaround. |
Thanks, Fernando! |
My gtkfix branch (http://github.com/markvoorhies/ipython/tree/gtkfix) is 0.10.2 with Confirmed that "ipython --pylab --gthread" hangs prior to reverting 3e84e9f, but that |
Keeping simple things simple - I can confirm that: |
I updated to the 10.2 git branch just now, and while "ipython -pylab -gthread" leads to a working interpreter, "ipython -pylab" (no -gthread argument) exhibits the same problems described in the bug description. |
Mmh, I see that. It's very odd, but thanks for pointing it out. I'll investigate further before pushing 0.10.2 out. |
Any word on when 0.10.2 will be released? |
Unfortunately I'm swamped and will remain so for the next 3-4 weeks. The issue is that even in the 0.10.2 branch as it stands now, the regression isn't fixed. Non-gtk backends work OK, but the gtk one remains borked, and if nobody submits a pull request with a good fix for it, I'll need some time to work on restoring the functionality myself. So likely 3 weeks at best, I'm afraid. Lack of manpower sucks... The best way to help would be for someone to provide a pull request against 0.10.2 that fully fixes this, and then I could quickly cut a release. |
I should have time to hack on this tomorrow night, but I'm having a bit of trouble ipython --pylab I don't see blocking. (This is on Ubuntu Lucid with up-to-date matplotlib) Fernando or Drew, is there a better test case that I should be using? |
The original issue was created by a portion of commit 3e84e9f which I'll refer to as "problematic commit". My fix185 branch originally undid a portion of the problematic commit, and the outstanding issue relates to other portions of that same commit. What isn't clear to me is the purpose of the function check_gtk inside Shell.py, which was added in the problematic commit. For some reason, it unconditionally returns mode 'tkthread' if gtk was safely imported and hasattr 'set_interactive', regardless of what mode was passed to it. This "functionality" is not used with the -pylab flag, which is why original one line change did not fix the issue for "ipython -gthread" I added another commit to the fix185 branch which removes check_gtk() altogether, and see no issues using ipython -gthread, ipython -gthread -pylab, or ipython -pylab. Additionally, the check_gtk() imported gtk regardless of what mode the user selected, and might also be what's been causing the "Why is IPython using X11" threads on the mailing list. also, I just want to note here that users will see this issue if they use e.g "ipython -gthread" but their matplotlib is set to some other backend by default (say "WX"). I opened pull request #237 to get this into 0.10.2 branch |
mark: d'oh - we keep getting into race conditions with one another! :) can you test the latest in my fix185 branch with: ipython -gthread the ipython -pylab -gthread were taken care of by the earlier fix, the -gthread without -pylab and just -pylab was actually problematic for me. Make sure that your matplotlib is using backend GTK when you do your test. I tested with import matplotlib.pyplot as plt |
Paul: Ah, my bad, I was testing with the TkAgg backend. With the GTK backend and current fix185 (7fb20b) "ipython --gthread" runs Paul's test |
Note: this old bug in LP https://bugs.launchpad.net/ipython/+bug/270856 actually has useful info and the attached script by Ville seems to work well. I'll try to take care of this in the next few days so we can finally get 0.10.2 out the door and fix the gtk brokenness. |
Actually, now that we've merged all of Paul's pull requests, I think we're finally back to normal for GTK on 0.10.2. Many thanks to everyone for the help with this! I'll close this now, please reopen if anybody notices any problems still with 0.10.2. |
After updating to ipython 0.10.1 on 64-bit Linux, I noticed that plotting commands no longer automatically display anything when ipython is started with the -pylab option. Moreover, the show() command now appears to block in pylab mode. I don't have any local ~/.matplotlib/matplotlibrc file installed.
The text was updated successfully, but these errors were encountered: