Skip to content
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

Oops - crash on IPython 7 #21

Open
matthew-brett opened this issue Oct 12, 2018 · 7 comments · May be fixed by #23
Open

Oops - crash on IPython 7 #21

matthew-brett opened this issue Oct 12, 2018 · 7 comments · May be fixed by #23

Comments

@matthew-brett
Copy link

I have extra need of readline, now prompt_toolkit seems to be broken for IPython 7:

ipython/ipython#1133

But sadly, with IPython 7, current rlipython

$ ipython
Python 3.6.4 (default, Mar 22 2018, 14:11:17) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import os
Traceback (most recent call last):
  File "/Users/brettmz/.virtualenvs/dsfe/bin/ipython", line 11, in <module>
    sys.exit(start_ipython())
  File "/Users/brettmz/.virtualenvs/dsfe/lib/python3.6/site-packages/IPython/__init__.py", line 125, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/Users/brettmz/.virtualenvs/dsfe/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/Users/brettmz/.virtualenvs/dsfe/lib/python3.6/site-packages/IPython/terminal/ipapp.py", line 356, in start
    self.shell.mainloop()
  File "/Users/brettmz/dev_trees/rlipython/rlipython/shell.py", line 454, in mainloop
    self.interact(display_banner=display_banner)
  File "/Users/brettmz/dev_trees/rlipython/rlipython/shell.py", line 571, in interact
    self.input_splitter.push(line)
AttributeError: 'TransformerManager' object has no attribute 'push'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at [email protected]

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

I did try patching it up, but I soon got lost. But I tried. Honest.

@Carreau
Copy link
Member

Carreau commented Oct 12, 2018

Yeah the transformer APi have been changed to be simpler. rl ipython have not been updated to use it.

@prittjam
Copy link

As I understand it, rlipython is not usable with ipython 7.x? I have the same problem.

@luckjiff
Copy link

luckjiff commented Feb 13, 2019

rlipython rocks! It was the only way I found to make emacs work with ipython 6.2.1 and have completion in the inferior shell. But you guys know this already. Why why why was prompt toolkit brought it without providing for readline? There are a lot of us emacs/python folks out here still right? Maybe not in 20 years... :)

@WaterSibilantFalling
Copy link

WaterSibilantFalling commented Mar 27, 2019

great. so now I can't use ipython, 'cos it crashes on startup.

You do realize that you - the rlipython programmers - have ruined ipython for everyone who has installed rlipython?

@Carreau
Copy link
Member

Carreau commented Mar 27, 2019 via email

asmeurer added a commit to asmeurer/pyflyby that referenced this issue Apr 22, 2019
rlipython is broken with IPython 7.0. See
ipython/rlipython#21.
@keflavich
Copy link

I'm trying to find a fix, but haven't gotten too far yet. Just some notes in case anyone else wants to keep on with this:
input_splitter is now a property of InteractiveShell that points to inputtransformer2.TransformerManager. I'm not sure which method of that to use instead of push, though... that will take some more reading.

@WaterSibilantFalling
Copy link

WaterSibilantFalling commented Jul 7, 2019

EDIT: maybe this is the wrong bug/issue/ticket

I don't know if this helps, but after I tried to uninstall rlipython:

$ python -m pip uninstall rlipython
WARNING: Skipping rlipython as it is not installed.

I still cannot use ipython:

$ ipython3
=========
 IPython
=========

Tools for Interactive Computing in Python
=========================================
       :
       :
       :     <snip>
       :
       :
[TerminalIPythonApp] CRITICAL | Bad config encountered during initialization:
[TerminalIPythonApp] CRITICAL | The 'interactive_shell_class' trait of <IPython.terminal.ipapp.TerminalIPythonApp object at 0x000001A4ED6B1940> instance must be a type, but 'rlipython.TerminalInteractiveShell' could not be imported

(doesn't run)

@cc-a cc-a linked a pull request Sep 8, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants