Skip to content

PR: Add experimental support for PySide2#9953

Closed
ccordoba12 wants to merge 7 commits intospyder-ide:masterfrom
ccordoba12:support-pyside2
Closed

PR: Add experimental support for PySide2#9953
ccordoba12 wants to merge 7 commits intospyder-ide:masterfrom
ccordoba12:support-pyside2

Conversation

@ccordoba12
Copy link
Copy Markdown
Member

@ccordoba12 ccordoba12 commented Aug 3, 2019

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

TODOs

  • Fix signals connection in BasePlugin
  • Fix syntax highlighter error
  • Change order selection between PySide2 and PyQt5? Right now PySide2 is only used if PyQt5 is not installed, else PyQt5 is always preferred.
  • Add support for PySide2 to bootstrap.py
  • Add PySide2 to our CIs

Fixes #6894.

@ccordoba12 ccordoba12 added this to the v4.0betaX milestone Aug 3, 2019
@pep8speaks
Copy link
Copy Markdown

pep8speaks commented Aug 3, 2019

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 318:21: E265 block comment should start with '# '

Comment last updated at 2019-08-04 15:20:16 UTC

@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Aug 3, 2019

the experiment seems to work, on at least the startup test

@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Aug 3, 2019

and now after full rebuild, it doesn't finish starting and I see the dark theme... maybe I mistaken my early test

@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Aug 3, 2019

you still ask for PyQt5 in the setup file in this branch ?

@ccordoba12
Copy link
Copy Markdown
Member Author

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.

@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Aug 4, 2019

currently, my ps2 branch is stuck at this starting step:
image

not seeing the "connecting to kernel" on the bottom right.

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).
@ccordoba12
Copy link
Copy Markdown
Member Author

@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.

@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Aug 4, 2019

ok, will wait.

@ccordoba12 ccordoba12 modified the milestones: v4.0rc, future Sep 15, 2019
@goanpeca goanpeca modified the milestones: future, v5.0beta1 Nov 30, 2019
@goanpeca goanpeca removed this from the v5.0beta1 milestone Feb 18, 2020
@stonebig
Copy link
Copy Markdown
Contributor

stonebig commented Apr 7, 2020

small question: if Spyder-5 tries again the Pyside2 compatibility route, are these patches still in the right direction ?

@ccordoba12
Copy link
Copy Markdown
Member Author

Some of them. Others will be superseded by other PRs.

@goanpeca goanpeca removed the v5.0beta1 label Jun 1, 2020
@goanpeca
Copy link
Copy Markdown
Contributor

goanpeca commented Jun 1, 2020

Will work on this after the API migration to be done in a couple of weeks.

The work will probably be much smaller.

@goanpeca goanpeca closed this Jun 1, 2020
@looooo looooo mentioned this pull request Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PySide2 support

4 participants