Skip to content

Commit 389b45f

Browse files
committed
Pin all Qt bindings for minimum version CI
1 parent f0cd8de commit 389b45f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
python-version: 3.8
3838
extra-requirements: '-c requirements/testing/minver.txt'
3939
pyqt5-ver: '==5.11.2 sip==5.0.0' # oldest versions with a Py3.8 wheel.
40+
pyqt6-ver: '==6.1.0 PyQt6-Qt6==6.1.0'
41+
pyside2-ver: '==5.11.2'
42+
pyside6-ver: '==6.0.0'
4043
delete-font-cache: true
4144
- os: ubuntu-20.04
4245
python-version: 3.8
@@ -189,17 +192,17 @@ jobs:
189192
echo 'PyQt5 is available' ||
190193
echo 'PyQt5 is not available'
191194
if [[ "${{ runner.os }}" != 'macOS' ]]; then
192-
python -mpip install --upgrade pyside2 &&
195+
python -mpip install --upgrade pyside2${{ matrix.pyside2-ver }} &&
193196
python -c 'import PySide2.QtCore' &&
194197
echo 'PySide2 is available' ||
195198
echo 'PySide2 is not available'
196199
fi
197200
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
198-
python -mpip install --upgrade pyqt6 &&
201+
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
199202
python -c 'import PyQt6.QtCore' &&
200203
echo 'PyQt6 is available' ||
201204
echo 'PyQt6 is not available'
202-
python -mpip install --upgrade pyside6 &&
205+
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
203206
python -c 'import PySide6.QtCore' &&
204207
echo 'PySide6 is available' ||
205208
echo 'PySide6 is not available'

lib/matplotlib/backends/qt_compat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def _isdeleted(obj): return not shiboken6.isValid(obj)
9292
_isdeleted = sip.isdeleted
9393
elif QT_API == QT_API_PYSIDE2:
9494
from PySide2 import QtCore, QtGui, QtWidgets, __version__
95-
import shiboken2
95+
try:
96+
from PySide2 import shiboken2
97+
except ImportError:
98+
import shiboken2
9699
def _isdeleted(obj):
97100
return not shiboken2.isValid(obj)
98101
else:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy