10000 Don't add QtNetwork to the API exported by qt_compat. by anntzer · Pull Request #20882 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Don't add QtNetwork to the API exported by qt_compat. #20882

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

Merged
merged 1 commit into from
Aug 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/matplotlib/backends/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,29 @@


def _setup_pyqt5plus():
global QtCore, QtGui, QtWidgets, QtNetwork, __version__, is_pyqt5, \
_isdeleted, _getSaveFileName
global QtCore, QtGui, QtWidgets, __version__, _isdeleted, _getSaveFileName

if QT_API == QT_API_PYQT6:
from PyQt6 import QtCore, QtGui, QtWidgets, QtNetwork, sip
from PyQt6 import QtCore, QtGui, QtWidgets, sip
__version__ = QtCore.PYQT_VERSION_STR
QtCore.Signal = QtCore.pyqtSignal
QtCore.Slot = QtCore.pyqtSlot
QtCore.Property = QtCore.pyqtProperty
_isdeleted = sip.isdeleted
elif QT_API == QT_API_PYSIDE6:
from PySide6 import QtCore, QtGui, QtWidgets, QtNetwork, __version__
from PySide6 import QtCore, QtGui, QtWidgets, __version__
import shiboken6
def _isdeleted(obj): return not shiboken6.isValid(obj)
elif QT_API == QT_API_PYQT5:
from PyQt5 import QtCore, QtGui, QtWidgets, QtNetwork
from PyQt5 import QtCore, QtGui, QtWidgets
import sip
__version__ = QtCore.PYQT_VERSION_STR
QtCore.Signal = QtCore.pyqtSignal
QtCore.Slot = QtCore.pyqtSlot
QtCore.Property = QtCore.pyqtProperty
_isdeleted = sip.isdeleted
elif QT_API == QT_API_PYSIDE2:
from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork, __version__
from PySide2 import QtCore, QtGui, QtWidgets, __version__
import shiboken2
def _isdeleted(obj):
return not shiboken2.isValid(obj)
Expand Down
0