FS#60861 - [python2-prompt_toolkit] version 2.0.7 breaks ipython2

Attached to Project: Community Packages
Opened by Antonio Rojas (arojas) - Monday, 19 November 2018, 06:51 GMT
Last edited by Kyle Keen (keenerd) - Monday, 19 November 2018, 21:34 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
ipython2 is not compatible with prompt_toolkit 2.0.7

> ipython2
Traceback (most recent call last):
File "/usr/bin/ipython2", line 4, in <module>
from IPython import start_ipython
File "/usr/lib/python2.7/site-packages/IPython/__init__.py", line 49, in <module>
from .terminal.embed import embed
File "/usr/lib/python2.7/site-packages/IPython/terminal/embed.py", line 18, in <module>
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/usr/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 20, in <module>
from prompt_toolkit.shortcuts import create_prompt_application, create_eventloop, create_prompt_layout, create_output
ImportError: cannot import name create_prompt_application

This task depends upon

Closed by  Kyle Keen (keenerd)
Monday, 19 November 2018, 21:34 GMT
Reason for closing:  Fixed
Additional comments about closing:  ipython2-5.8.0-2
Comment by Antonio Rojas (arojas) - Monday, 19 November 2018, 06:59 GMT
From https://github.com/ipython/ipython/issues/11341, ipython2 will likely never support prompt_toolkit 2.x. So python2-prompt_toolkit needs to be kept at version 1.x
Comment by Bruno Pagani (ArchangeGabriel) - Monday, 19 November 2018, 09:24 GMT
Yeah, we discussed that on IRC last week, ipython3 requires the update but ipython2 is not compatible with it. I think that some packages from Foxboron were affected too, and we wanted to coordinate on upgrading all those stacks.
Comment by Daniel Kumor (dkumor) - Monday, 19 November 2018, 12:50 GMT
This issue also affects sagemath, which is based on python2, making it completely unusable - the sage command crashes with the above error.
Comment by Kyle Keen (keenerd) - Monday, 19 November 2018, 17:48 GMT
Well crap. I had waited months for the non-ipython stuff to support the new prompt-toolkit and tested those.

I completely forgot to test ipython2. I did write an python2-prompt_toolkit1 split pkgbuild when I was experimenting, so this should be a quick fix.
Comment by Kyle Keen (keenerd) - Monday, 19 November 2018, 18:49 GMT
Fixed in ipython2-5.8.0-2. May I have a confirmation that this also fixes Sage?
Comment by Daniel Kumor (dkumor) - Monday, 19 November 2018, 20:15 GMT
Confirmed - after update both sage and ipython2 work :)
Comment by Kyle Keen (keenerd) - Monday, 19 November 2018, 21:34 GMT
Thanks. This was pretty much a worst-case nightmare scenario for me.

Loading...