After updating Sage to 5.7, tab completion stops working in the worksheets. I get this error in the command line: AttributeError Traceback (most recent call last) <ipython-input-24-1824bd036cbd> in <module>() ----> 1 __hist_tmp__=_; __IPYTHON__.complete("A.e");_=__hist_tmp__ AttributeError: 'bool' object has no attribute 'complete' Reproducible: Always
And the update to sage 5.8 completely breaks the sage backend...
You're right, it is completely broken at the moment. I don't yet know what has changed exactly, but I'll look into it. Thanks for reporting.
Created attachment 79659 [details] ipython configuration The breakage seems to be caused by the ipython prompt coloring interoduced in 5.8. Adding the attached contiguration file in ~/.sage/ipython-0.12/profile_sage/ (which disables colors) makes it work again. Tab completion is still broken though.
Created attachment 79660 [details] fix for sage 5.8 This patch works for me with sage 5.8, but I haven't tested old sage versions
Created attachment 79668 [details] Fix for sage 5.8, v2 And this one fixes tab completion too
Hi, thank you for working on this, and sorry I didn't get back to you sooner. Your fixes are correct, allthough (at least on my machine) I've hit several other problems with the newest sage version (the format returned by the complete command changed slightly, plotting needed some adjustments etc). I now have a quick and dirty fix for most of them, except I have a problem with enabling/disabling typesetting completely breaks the command history (the _ or __ variables). I hope I will have a fix for this soon (but am always open for suggestions).
> Your fixes are correct, allthough (at least on my machine) I've hit several other > problems with the newest sage version (the format returned by the complete > command changed slightly, plotting needed some adjustments etc). I now have a > quick and dirty fix for most of them Can we please see that fix? > except I have a problem with enabling/disabling typesetting completely breaks the > command history (the _ or __ variables). > I hope I will have a fix for this soon (but am always open for suggestions). And what's the update on this? We now finally have SAGE in Fedora, but it's version 5.8 (older versions did not pass review due to bundled libraries, so we got the brand new 5.8 even in Fedora 18 updates) and so it doesn't work with Cantor at all right now. :-( We're going to apply the patch from comment #5, but we could use a more complete fix.
Created attachment 80071 [details] preliminary fix this is the current state of my work on this bug. sorry it took me so long to update. The "_"-style variables still don't work, but I hope everything else is working again. Please give it some testing. This probably breaks sage versions <5.8 so before it goes into the main repository i need to come up with a fallback mechanism.
I built updated Fedora packages of Cantor with the patch from comment #8 and I tested them today. I can confirm that the patch works fine with SAGE 5.8, and also 5.9 which hit Fedora 18 updates today.
Git commit 5374d305f68a30ad04e2d7bb64ba825b436afd1a by Alexander Rieder. Committed on 23/06/2013 at 21:09. Pushed by arieder into branch 'master'. - fix sage backend for newer sage versions (>5.7) - introduce a "legacy mode" for older versions, using the old commands tested with sage v5.6 and 5.9 M +52 -1 src/backends/sage/sagecompletionobject.cpp M +5 -0 src/backends/sage/sagecompletionobject.h M +8 -7 src/backends/sage/sageexpression.cpp M +77 -12 src/backends/sage/sagesession.cpp M +4 -2 src/backends/sage/sagesession.h http://commits.kde.org/cantor/5374d305f68a30ad04e2d7bb64ba825b436afd1a
*** Bug 323372 has been marked as a duplicate of this bug. ***
*** Bug 325203 has been marked as a duplicate of this bug. ***