Skip to content

Commit 02887c7

Browse files
committed
Don't add QtNetwork to the API exported by qt_compat.
This was unnecessarily added. Also, is_pyqt5 is no more, so declaring it as global has no effect.
1 parent 9e8c8fa commit 02887c7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/matplotlib/backends/qt_compat.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,29 @@
7777

7878

7979
def _setup_pyqt5plus():
80-
global QtCore, QtGui, QtWidgets, QtNetwork, __version__, is_pyqt5, \
81-
_isdeleted, _getSaveFileName
80+
global QtCore, QtGui, QtWidgets, __version__, _isdeleted, _getSaveFileName
8281

8382
if QT_API == QT_API_PYQT6:
84-
from PyQt6 import QtCore, QtGui, QtWidgets, QtNetwork, sip
83+
from PyQt6 import QtCore, QtGui, QtWidgets, sip
8584
__version__ = QtCore.PYQT_VERSION_STR
8685
QtCore.Signal = QtCore.pyqtSignal
8786
QtCore.Slot = QtCore.pyqtSlot
8887
QtCore.Property = QtCore.pyqtProperty
8988
_isdeleted = sip.isdeleted
9089
elif QT_API == QT_API_PYSIDE6:
91-
from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, __version__
90+
from PySide6 import QtCore, QtGui, QtWidgets, __version__
9291
import shiboken6
9392
def _isdeleted(obj): return not shiboken6.isValid(obj)
9493
elif QT_API == QT_API_PYQT5:
95-
from PyQt5 import QtCore, QtGui, QtWidgets, QtNetwork
94+
from PyQt5 import QtCore, QtGui, QtWidgets
9695
import sip
9796
__version__ = QtCore.PYQT_VERSION_STR
9897
QtCore.Signal = QtCore.pyqtSignal
9998
QtCore.Slot = QtCore.pyqtSlot
10099
QtCore.Property = QtCore.pyqtProperty
101100
_isdeleted = sip.isdeleted
102101
elif QT_API == QT_API_PYSIDE2:
103-
from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork, __version__
102+
from PySide2 import QtCore, QtGui, QtWidgets, __version__
104103
import shiboken2
105104
def _isdeleted(obj):
106105
return not shiboken2.isValid(obj)

0 commit comments

Comments
 (0)