Bug 1634141
| Summary: | spyder: prompt_toolkit dependency | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Carl George 🤠<carlwgeorge> |
| Component: | spyder | Assignee: | Mukundan Ragavan <nonamedotc> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | nonamedotc, thozza |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-16 01:00:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Carl George ðŸ¤
2018-09-28 19:48:53 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? 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. |