Skip to content

Oops - crash on IPython 7 #21

@matthew-brett

Description

@matthew-brett

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 ipython-dev@python.org

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.

Activity

Carreau

Carreau commented on Oct 12, 2018

@Carreau
Member

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

prittjam

prittjam commented on Jan 28, 2019

@prittjam

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

luckjiff

luckjiff commented on Feb 13, 2019

@luckjiff

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

WaterSibilantFalling commented on Mar 27, 2019

@WaterSibilantFalling

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

Carreau commented on Mar 27, 2019

@Carreau
Member
added a commit that references this issue on Apr 22, 2019
keflavich

keflavich commented on Jul 7, 2019

@keflavich

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

WaterSibilantFalling commented on Jul 7, 2019

@WaterSibilantFalling

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)

linked a pull request that will close this issue on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @matthew-brett@keflavich@Carreau@prittjam@luckjiff

      Issue actions

        Oops - crash on IPython 7 · Issue #21 · ipython/rlipython