PyQt6 dropped QApplication.exec_() in favour of exec(), but PySide6 still allows either exec_() or exec().
Earlier PyQt5 versions don't have exec() since they needed to work on Python 2 where exec is a Python keyword.
We should define exec() on PyQt5 if it's not there already, and exec_() on PyQt6, so that all of them work.
I'll leave this issue open to track any other aliases that come up testing labscript programs
@dihm FYI - you might notice labscript programs crashing in PyQt6 due to use of exec_(). Currently changing that to exec() will fix for PyQt6 but break for older PyQt5. Once we add aliases here, either spelling will work for all three Qt libs.
Edit:
- [ ] QApplication.desktop missing in PySide6 and PyQt6, this is used in lyse. Looks like it was already deprecated in Qt5, so probably we should not add aliases for it and applications should move to whatever the newer thing is that's supported in Qt5 and Qt6 anyway. edit: already fixed by @dihm in lyse
PyQt6 dropped
QApplication.exec_()in favour ofexec(), but PySide6 still allows eitherexec_()orexec().Earlier PyQt5 versions don't have
exec()since they needed to work on Python 2 where exec is a Python keyword.We should define
exec()on PyQt5 if it's not there already, andexec_()on PyQt6, so that all of them work.I'll leave this issue open to track any other aliases that come up testing labscript programs
@dihm FYI - you might notice labscript programs crashing in PyQt6 due to use of
exec_(). Currently changing that toexec()will fix for PyQt6 but break for older PyQt5. Once we add aliases here, either spelling will work for all three Qt libs.Edit:
- [ ] QApplication.desktop missing in PySide6 and PyQt6, this is used in lyse. Looks like it was already deprecated in Qt5, so probably we should not add aliases for it and applications should move to whatever the newer thing is that's supported in Qt5 and Qt6 anyway.edit: already fixed by @dihm in lyse