From 434ac7b1c6b0735a44ffeff6d7d8fc5be92fee8d 2019-02-20 20:55:00 From: bnables Date: 2019-02-20 20:55:00 Subject: [PATCH] Fixed PyQt 5.11 backwards incompatibility by moving import sip after other imports --- diff --git a/IPython/external/qt_loaders.py b/IPython/external/qt_loaders.py index ef6b898..5bf3899 100644 --- a/IPython/external/qt_loaders.py +++ b/IPython/external/qt_loaders.py @@ -217,10 +217,13 @@ def import_pyqt5(): ImportErrors rasied within this function are non-recoverable """ - import sip from PyQt5 import QtCore, QtSvg, QtWidgets, QtGui - + + # Note that import sip must follow other PyQt5 imports for PyQt >5.11 + # http://pyqt.sourceforge.net/Docs/PyQt5/incompatibilities.html#pyqt-v5-11 + import sip + # Alias PyQt-specific functions for PySide compatibility. QtCore.Signal = QtCore.pyqtSignal QtCore.Slot = QtCore.pyqtSlot