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
Namespaced sip #450
Comments
Hi, thanks for the report, but I'm not quite sure what the problem is - the reference to the redhat issue is not particularly enlightening. Most of the code shown above is only run in the case that the Qt toolkit being used is PyQt4 and is not run when using the PyQt5 toolkit. We are doing essentially the same thing as, eg. qtpy here https://github.com/spyder-ide/qtpy/blob/master/qtpy/__init__.py#L181 Can you provide a bit more detail about what the issue is, with pointers to sip documentation showing best practices if we are not following them. |
Honestly, I don't think I can - I'm really just relaying the bug that was filed in fedora. But apparently one should be using PyQt4.sip.... instead of sip.... ? |
OK, I have dug a little deeper and this appears to be a very new, backwards incompatible change in PyQt's API. Importing Fortunately PyQt installs The I think that the solution is to add
into the |
@opoplawski Hopefully this is resolved by #452 I am going to close this ticket, but please feel free to re-open if there is something that we have missed. |
What's the status of Qt5 support? Fedora is trying to move away from Qt4. |
Qt5 Should be fully supported via PyQt5; PySide2 support is experimental but seems to be working in most tests. There may be some issues around WebKit vs. WebEngine (so Qt 5.6 vs later versions): no-one has reported issues yet, but I don't think it is extensively used. |
Forwarded from: https://bugzilla.redhat.com/show_bug.cgi?id=1753414
python-pyface currently includes code that explicitly loads non-namespaced sip module,
yface/ui/qt4/workbench/split_tab_widget.py: import sip
pyface/ui/qt4/workbench/split_tab_widget.py: if sip.isdeleted(self):
pyface/qt/init.py: import sip
pyface/qt/init.py: sip.setapi('QDate', 2)
pyface/qt/init.py: sip.setapi('QDateTime', 2)
pyface/qt/init.py: sip.setapi('QString', 2)
pyface/qt/init.py: sip.setapi('QTextStream', 2)
pyface/qt/init.py: sip.setapi('QTime', 2)
pyface/qt/init.py: sip.setapi('QUrl', 2)
pyface/qt/init.py: sip.setapi('QVariant', 2)
Recent versions of sip now use name-spaced modules, so either this code can either be dropped or use PyQt4.sip instead.
(Or ideally, appears it at least has some support for PyQt5 which is better supported).
See also bug
https://bugzilla.redhat.com/show_bug.cgi?id=1753069
The text was updated successfully, but these errors were encountered: