Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with PyQt5 #421

Closed
ghisvail opened this issue Aug 18, 2016 · 16 comments
Closed

Compatibility with PyQt5 #421

ghisvail opened this issue Aug 18, 2016 · 16 comments

Comments

@ghisvail
Copy link
Contributor

The Python ecosystem is slowly but surely transitioning to Qt5. Are there any plans to make pyzo compatible with PyQt5 (and perhaps PySide2 later) in the future? Perhaps using a shim layer like the spyder guys did?

@Nodd
Copy link

Nodd commented Aug 18, 2016

For reference, git-cola used qtpy for the transition, here is the relevant issue if you're interested in the discussion: git-cola/git-cola#232
(disclaimer: I'm a qtpy/spyder dev).

@almarklein
Copy link
Member

I think that makes sense. Now to find the time to do it :)

@ghisvail
Copy link
Contributor Author

ghisvail commented Aug 19, 2016

How much work do you reckon this would require?

@almarklein
Copy link
Member

I find it hard to guess. I recon that it won't be too much, since Pyzo uses the new-style PyQt already. Though I don't know what problems will come up. Possibly using qtpy might help.

@ghisvail
Copy link
Contributor Author

ghisvail commented Sep 15, 2016

Is pyzo.util.qt the only place in the code that should be modified to make pyzo support qtpy or pyqt5 ?

@almarklein
Copy link
Member

yes, all code in Pyzo eventually loads it from that module.

@almarklein
Copy link
Member

About done, except testing on PySide / PyQt5: #433

@ghisvail
Copy link
Contributor Author

Do you want me to try it out with PyQt5? SincePyQt5 is packaged as a wheel on PyPI, it should be quite straightforward.

Overall, what's left to be done for the next stable release to happen?

@almarklein
Copy link
Member

what's left to be done for the next stable release to happen?

I want to have a look at the binaries for Linux; whether updating Qt, or using PyQt5 fixes these nasty issues we're having.

I you want to try out PyQt5 with this branch that would be helpful, thanks!

@ghisvail
Copy link
Contributor Author

I you want to try out PyQt5 with this branch that would be helpful, thanks!

I'll spin up a venv with PyQt5 and the dev snapshot and program in it for the day. I'll report anything unusual.

@ghisvail
Copy link
Contributor Author

QStringListModel in QtCore not QtWidgets.

QStringListModel.diff.txt

@ghisvail
Copy link
Contributor Author

Here is the full diff I had to apply to allow Pyzo to load with PyQt5.

load_with_pyqt5.diff.txt

Hope this helps.

@ghisvail
Copy link
Contributor Author

And a little screenshot!

pyzo_with_pyqt5

@almarklein
Copy link
Member

Awesome! Thanks for that @ghisvail !

@ghisvail
Copy link
Contributor Author

Nothing bad to report. Shall I turn the .diff into a PR?

@almarklein
Copy link
Member

Shall I turn the .diff into a PR?

Please :D

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

No branches or pull requests

3 participants