PR: Add experimental support for PySide2#9953
PR: Add experimental support for PySide2#9953ccordoba12 wants to merge 7 commits intospyder-ide:masterfrom
Conversation
Conflicts: - spyder/api/plugins.py - spyder/app/tests/test_mainwindow.py - spyder/plugins/base.py
|
Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-08-04 15:20:16 UTC |
|
the experiment seems to work, on at least the startup test |
|
and now after full rebuild, it doesn't finish starting and I see the dark theme... maybe I mistaken my early test |
|
you still ask for PyQt5 in the setup file in this branch ? |
Yes, that's why support for PySide2 will be experimental for the time being. In other words, we won't depend on PySide2 directly, but if it's found in your Python installation then we'll pick it up and use it. |
This is because: - SpyderPlugin really needs to inherit from QObject to be able to connect signals to slots (that's needed by PySide2 and it was also shown by Edgar when creating the completion plugins). - PyQt5 gives a segfault when trying to initialize an object that inherits from QObject and QWidget at the same time (which would be the case if we allow SpyderPluginWidget to inherit from SpyderPlugin).
|
@stonebig, this is going to take a while (a month or month and a half), so please don't insist for this to be ready right now. |
|
ok, will wait. |
|
small question: if Spyder-5 tries again the Pyside2 compatibility route, are these patches still in the right direction ? |
|
Some of them. Others will be superseded by other PRs. |
|
Will work on this after the API migration to be done in a couple of weeks. The work will probably be much smaller. |

Given that PySide2 seems to be quite stable since its official release, we decided to add experimental support for it in Spyder 4.
TODOs
Fixes #6894.