-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove PyQt4 and PySide support #512
Changes from all commits
0ff85ae
2cab66c
3c28b8b
51b4ee4
bf07df2
3560f7f
4453453
84d3fea
2199229
15fe9a2
db8787f
202171a
b53f205
894c9c1
93f8f34
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,7 @@ | |
# Thanks for using Enthought open source! | ||
from . import qt_api | ||
|
||
if qt_api == "pyqt": | ||
from PyQt4.QtCore import * | ||
|
||
from PyQt4.QtCore import pyqtProperty as Property | ||
from PyQt4.QtCore import pyqtSignal as Signal | ||
from PyQt4.QtCore import pyqtSlot as Slot | ||
from PyQt4.Qt import QCoreApplication | ||
from PyQt4.Qt import Qt | ||
|
||
__version__ = QT_VERSION_STR | ||
__version_info__ = tuple(map(int, QT_VERSION_STR.split("."))) | ||
|
||
elif qt_api == "pyqt5": | ||
if qt_api == "pyqt5": | ||
from PyQt5.QtCore import * | ||
|
||
from PyQt5.QtCore import pyqtProperty as Property | ||
|
@@ -33,14 +21,7 @@ | |
__version__ = QT_VERSION_STR | ||
__version_info__ = tuple(map(int, QT_VERSION_STR.split("."))) | ||
|
||
|
||
elif qt_api == "pyside2": | ||
else: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noting an observation: It is not necessary (though would be defensive) to check qt_api is "pyside2" here again because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is OK to do this, since Pyside2 is the blessed Python Qt wrapper provided by the Qt Company. If a new wrapper cam along it would likely follow the Pyside conventions more than the PyQt conventions. |
||
from PySide2.QtCore import * | ||
|
||
from PySide2 import __version__, __version_info__ | ||
else: | ||
try: | ||
from PySide import __version__, __version_info__ | ||
except ImportError: | ||
pass | ||
from PySide.QtCore import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit and subjective: I would prefer seeing "pyqt5" in the environment name so that wherever I see "pyqt" in CI logs etc I know it is the old Qt4 being used.
Unrelated drive-by comment: This ETS_TOOLKIT looks sadly inconsistent :( "qt4" does not mean "qt4" anymore, it just means Qt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Post-mortem: It is painful when an old environment name is reused for a new meaning and then that change has to be reverted later. Let's not do this again.