Fedora Account System
Red Hat Associate
Red Hat Customer
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
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?
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!
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.
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.
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
That sounds reasonable. Thanks.
I have done this now. Thank you for your patience.