-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support IPython 5.0 #79
Comments
One thing that broke is accessing the IPython REPL in ob-ipython via C-c C-v C-z; the new prompt-toolkit features cause emacs to hang as they fight over things like tab completion. There's a new IPython option, "ipython --simple-prompt" that disables prompt-toolkit for emacs inferior-python (mentioned in the "what's new in v5.0 IPython" docs). However, there's an orthogonal problem: "ipython --existing" is deprecated and one must now use "jupyter console --existing", but jupyter-console doesn't have/pass the --simple-prompt option to the IPython kernel. Hopefully jupyter/jupyter_console#93 will get addressed, and thus help fix ob-ipython. BTW, the recent merge of #67 helps, now that everything will probably need to through jupyter. |
I just ran into this problem as well and found the exact same issue as @singletS . A workaround exists that has the same basic functionality as the When starting up, Thus, until jupyter/jupyter_console#93 can get addressed, the Looking through the source code for jupyter_console, this should not produce any other side effects (beyond the effects of the prompt) as it is only used to set the prompt. This also works for solving jorgenschaefer/elpy#908 if you want to keep a consistent environment between |
Thank you @ajsteven130 this works (combined with #67 of course) mostly. In the REPL (opened with |
hi @osdf. Using the |
I got a chance to try with prompt_toolkit 1.0.4, as suggested in ipython/ipython#9816 and it did not seem to help. You can see the traceback and details at ipython/ipython#9816 (comment) |
Yes, I just tried it out myself. Without the above |
There is a new comment now for ipython/ipython#9816. What does that mean with respect to this issue (or actually the prompt problem)? |
It means there has not been any publicly visible progress. To get multiline editing, they prefer using other emacs/elpy/org-mode features. For the time being, I would suggest working like tacaswell - do your multiline editing in orgmode code blocks, python buffers, or temporary python buffers. There is also EIN, the emacs ipython notebook for ipython/jupyter integration in emacs. It seems like the mode used for the REPL, comint mode, may be very, very hard to integrate with multiline editing and other nice things like displaying figures, etc. The choice seems to be to either use other awesome features at your disposal through ob-ipython, elpy, etc.,, or write a richer mode for the repl which is a non-trivial task. |
Another possible path is something like https://github.com/Carreau/xonshpiration which is a proof-of-concept of programmaticly driving prompt-toolkit from another thread. I do not have a clear idea of how that would help, but it seems to be going in the right direction. I (personally) view the multi-line editing stuff in the REPL a work-around to not having access to an emacs buffer in python-mode. One UI thing that would be cool (that I lack the elisp to do), is an equivalent sorry for the peanut-gallery quality of my comments on this. |
I'm running into a lot of lag running code, which I think may be related to this change in ipython. I'm running ipython 5.1.0. After the kernel and client driver startup, executing ipython babel blocks seems to work normally - the code executes normally and inserts the result into the buffer. However, it takes several seconds to run an operation that should be instantaneous However, if I try to type commands into the REPL, there's an incredible delay in getting output. For example,
hangs emacs for ~5 seconds, then prints. Similarly running this command in the REPL hangs for 5 seconds before printing, then another 5 seconds before printing the next ipython prompt. Any ideas? Update: I got a backtrace during one of these hangs - it looks like emacs is stuck in url-retrieve-synchronously. Maybe this means that the tornado server or jupyter itself is hanging momentarily for some reason? |
Not sure what's happening there. Admittedly I'm running 5.0.0 but everything is instant here. Until my package manager has 5.1, I'm not really willing to upgrade. You'll need to provide more info as I can't reproduce. |
5.0 is working for me now and I haven't run in to any issues: closing this. @EmperorDali, if you're still experiencing issues and can give me more info or - better - repro steps feel free to cut a new issue. |
http://blog.jupyter.org/2016/07/08/ipython-5-0-released/
Ok, great. What broke this time?
As this is now LTS maybe we should make this the minimum required version for ob-ipython? I'm fed up of supporting multiple API versions.
The text was updated successfully, but these errors were encountered: