Bug 1634141 - spyder: prompt_toolkit dependency
Summary: spyder: prompt_toolkit dependency
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: spyder
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mukundan Ragavan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-28 19:48 UTC by Carl George 🤠
Modified: 2018-10-16 01:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-10-16 01:00:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1475812 0 unspecified CLOSED python-prompt_toolkit-2.0.4 is available 2021-02-22 00:41:40 UTC

Internal Links: 1475812

Description Carl George 🤠 2018-09-28 19:48:53 UTC
Description of problem:
python2-spyder and python3-spyder currently require python2-prompt_toolkit and python3-prompt_toolkit, respectively.  I'm working on a backwards-incompatible prompt_toolkit update (1.x.x to 2.x.x) for rawhide, but I can't find any information on whether spyder is compatible with prompt_toolkit 2.  In fact, I can't find any reference to prompt_toolkit in the upstream spyder code [0].  Is this dependency correct?

Version-Release number of selected component (if applicable):
python2-spyder-0:3.3.1-3.fc30
python3-spyder-0:3.3.1-3.fc30

Additional info:
[0]: https://github.com/spyder-ide/spyder/search?q=prompt_toolkit

Comment 1 Mukundan Ragavan 2018-09-29 00:43:59 UTC
I know I manually added prompt_toolkit as a dependency at some point. I will investigate this tomorrow and fix this as needed.

Does that sound OK?

Comment 2 Mukundan Ragavan 2018-09-30 21:59:26 UTC
Yes. Spyder needs prompt_toolkit to function.

Without prompt_toolkit, this will happen

$ spyder3
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3181, in main
    mainwindow = run_spyder(app, options, args)
  File "/usr/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3057, in run_spyder
    main.setup()
  File "/usr/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 896, in setup
    from spyder.plugins.ipythonconsole import IPythonConsole
  File "/usr/lib/python3.7/site-packages/spyder/plugins/ipythonconsole.py", line 59, in <module>
    from spyder.widgets.ipythonconsole import ClientWidget
  File "/usr/lib/python3.7/site-packages/spyder/widgets/ipythonconsole/__init__.py", line 12, in <module>
    from .debugging import DebuggingWidget
  File "/usr/lib/python3.7/site-packages/spyder/widgets/ipythonconsole/debugging.py", line 17, in <module>
    from qtconsole.rich_jupyter_widget import RichJupyterWidget
  File "/usr/lib/python3.7/site-packages/qtconsole/rich_jupyter_widget.py", line 14, in <module>
    from .jupyter_widget import JupyterWidget
  File "/usr/lib/python3.7/site-packages/qtconsole/jupyter_widget.py", line 19, in <module>
    from IPython.lib.lexers import IPythonLexer, IPython3Lexer
  File "/usr/lib/python3.7/site-packages/IPython/__init__.py", line 55, in <module>
    from .terminal.embed import embed
  File "/usr/lib/python3.7/site-packages/IPython/terminal/embed.py", line 16, in <module>
    from IPython.terminal.interactiveshell import TerminalInteractiveShell
  File "/usr/lib/python3.7/site-packages/IPython/terminal/interactiveshell.py", line 18, in <module>
    from prompt_toolkit.document import Document
ModuleNotFoundError: No module named 'prompt_toolkit'


Can you please open an upstream issue with this question or would you prefer that I do?

Thanks!

Comment 3 Carl George 🤠 2018-10-01 15:42:32 UTC
Based on that stacktrace, it seems that spyder isn't using prompt_toolkit directly.  It's using qtconsole, which is using IPython, which is using prompt_toolkit.  I think the best course of action is to just remove the prompt_toolkit dependency from the spyder spec file.

Comment 4 Mukundan Ragavan 2018-10-01 23:20:54 UTC
Well, that is correct but at some point in the past, there was an issue of yum/dnf not pulling in prompt_toolkit when installing spyder. 

I will revisit this issue again before I can remove it. I will be able to do this a few days later. I will be away for the next few days.

Comment 5 Carl George 🤠 2018-10-02 13:10:21 UTC
Upstream, IPython 5 was when prompt_toolkit was added as a dependency [0].  When Fedora updated ipython from 3.2.1 to 5.3.0, the package gained the correct requires on prompt_toolkit [1].  Based on that I don't know how a situation could arise where a version of ipython that used prompt_toolkit was installed that didn't pull in prompt_toolkit as a dependency.

I'm going to move forward with the backwards-incompatible prompt_toolkit upgrade in rawhide only.  It shouldn't affect spyder since sypder doesn't directly import prompt_toolkit, but let me know if you see any issues.  Please remove the prompt_toolkit requires when you're able.  Thanks!

[0]: https://github.com/ipython/ipython/commit/67d7c405d3ee45570b44d4c37a5c23b5f21068d8
[1]: https://src.fedoraproject.org/rpms/ipython/c/eb72a81a8a29f8f40136ba2f9be59617add76f79

Comment 6 Mukundan Ragavan 2018-10-03 02:18:52 UTC
That sounds reasonable. Thanks.

Comment 7 Mukundan Ragavan 2018-10-16 01:00:38 UTC
I have done this now. Thank you for your patience.


Note You need to log in before you can comment on or make changes to this bug.