Skip to content

Commit 8c32a24

Browse files
authored
PR: Update Qt6 binding versions to check version 6.8, add Python 3.13, use macos-15-intel and drop Python 3.7 and 3.8 (CI) (#523)
1 parent 347f86b commit 8c32a24

File tree

8 files changed

+63
-43
lines changed

8 files changed

+63
-43
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,54 +43,67 @@ jobs:
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
os: [ubuntu-latest, windows-latest, macos-13]
47-
python-version: ['3.7', '3.11']
46+
os: [ubuntu-latest, windows-latest, macos-15-intel]
47+
python-version: ['3.9', '3.11', '3.13']
4848
use-conda: ['Yes', 'No']
4949
qt5-version-default: ['5.12']
50-
qt6-version-default: ['6.3']
50+
qt6-version-default: ['6.5']
5151
qscintilla-version-default: ['2.13']
5252
pyqt-extras-default: ['No']
5353
include:
5454
- os: ubuntu-latest
5555
special-invocation: 'xvfb-run --auto-servernum ' # Needed for GUI tests to work
56+
- python-version: '3.13'
57+
pyqt5-version: '5.15'
58+
skip-pyside2: true # Unavailable for Python 3.13+
59+
pyqt6-version: '6.8'
60+
pyside6-version: '6.8'
5661
- python-version: '3.11'
5762
pyqt5-version: '5.15' # Python 3.11 needs 5.15+
5863
pyside2-version: '5.15' # Python 3.11 needs 5.15+
59-
pyside6-version: '6.5' # Python 3.11 needs 6.4+. Test upper bound
64+
pyside6-version: '6.8' # Python 3.11 needs 6.4+. Test upper bound
6065
- use-conda: 'Yes'
61-
skip-pyqt6: true # No PyQt6 conda packages yet
66+
skip-pyqt6: true # PyQt6 conda packages only available from anaconda channel
6267
- use-conda: 'No'
6368
pyqt5-version: '5.15' # Test with latest optional packages
64-
- python-version: '3.7'
69+
- python-version: '3.9'
6570
use-conda: 'Yes'
6671
pyside2-version: '5.13' # Conda needs 5.13+ to work reliably
6772
pyside2-qt-version: '5.12' # Conda only has 5.12 and 5.15, not 5.13
68-
pyside6-version: '6.4' # Conda only has 6.4 for Python <3.8
6973
- python-version: '3.11'
7074
use-conda: 'No'
7175
pyqt-extras: 'Yes' # Check PyQt extras
7276
skip-pyside2: true # Pyside2 wheels don't support Python 3.11+
73-
pyqt6-version: '6.5' # Test upper bound
74-
pyside6-version: '6.5' # Test upper bound
77+
pyqt6-version: '6.8' # Test upper bound
78+
pyside6-version: '6.8' # Test upper bound
7579
- os: windows-latest
76-
python-version: '3.7'
77-
use-conda: 'Yes'
78-
pyqt5-version: '5.9' # Test lower bound
79-
skip-pyside6: true # Test hangs with 6.4. 6.5 is not available for Python 3.7
80-
- os: windows-latest
81-
python-version: '3.7'
80+
python-version: '3.9'
8281
use-conda: 'No'
8382
pyqt6-version: 6.2 # Test lower bound
8483
pyside6-version: 6.2 # Test lower bound
84+
pyside2-version: 5.15 # Version 5.12 not available
8585
- os: windows-latest
8686
python-version: '3.11'
8787
use-conda: 'Yes'
88-
pyside6-version: 6.5 # Test upper bound
89-
- os: macos-13
88+
pyside6-version: 6.8 # Test upper bound
89+
- os: macos-15-intel
9090
python-version: '3.11'
9191
use-conda: 'No'
92-
pyqt6-version: 6.5 # Test upper bound
92+
pyqt6-version: 6.8 # Test upper bound
9393
pyside2-version: 5.15 # Test upper bound
94+
- os: macos-15-intel
95+
python-version: '3.9'
96+
use-conda: 'No'
97+
pyqt6-version: 6.2 # Test lower bound
98+
pyside6-version: 6.2 # Test lower bound
99+
- os: macos-15-intel
100+
python-version: '3.9'
101+
use-conda: 'Yes'
102+
pyside6-version: 6.8 # Test upper bound. Gets stuck with 6.5
103+
exclude:
104+
- os: macos-15-intel
105+
python-version: '3.11'
106+
use-conda: 'Yes'
94107
steps:
95108
- name: Check job values
96109
run: |

.github/workflows/test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ if [ "$USE_CONDA" = "Yes" ]; then
2626
QT_SPECS="qt=${PYSIDE2_QT_VERSION} pyside2=${PYSIDE2_VERSION}"
2727
elif [ "${1}" = "pyside6" ]; then
2828
QT_SPECS="qt6-main=${PYSIDE6_QT_VERSION} pyside6=${PYSIDE6_VERSION}"
29+
if [ "${!QT_VERSION_VAR:0:3}" = "6.8" ]; then
30+
QT_SPECS+=" qt6-multimedia=${PYSIDE6_QT_VERSION}"
31+
fi
2932
else
3033
exit 1
3134
fi

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
rev: v2.5.0
3131
hooks:
3232
- id: setup-cfg-fmt
33-
args: ["--include-version-classifiers", "--max-py-version", "3.11", "--min-py-version", "3.7"]
33+
args: ["--include-version-classifiers", "--max-py-version", "3.13", "--min-py-version", "3.9"]
3434

3535
ci:
3636
autoupdate_schedule: monthly

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -177,26 +177,26 @@ checking feature while using QtPy in your source code.
177177
## Testing matrix
178178

179179
Currently, QtPy runs tests for different bindings on Linux, Windows and macOS, using
180-
Python 3.7 and 3.11, and installing those bindings with `conda` and `pip`. For the
180+
Python 3.9, 3.11 and 3.13, and installing those bindings with `conda` and `pip`. For the
181181
PyQt bindings, we also check the installation of extra packages via `pip`.
182182

183183
Following this, the current test matrix looks something like this:
184184

185-
| | Python | 3.7 | | 3.11 | |
186-
|---------|-----------------|--------------------------------------------|------|--------------------|----------------------------|
187-
| OS | Binding / manager | conda | pip | conda | pip |
188-
| Linux | PyQt5 | 5.12 | 5.15 | 5.15 | 5.15 (with extras) |
189-
| | PyQt6 | skip (unavailable) | 6.3 | skip (unavailable) | 6.5 (with extras) |
190-
| | PySide2 | 5.13 | 5.12 | 5.15 | skip (no wheels available) |
191-
| | PySide6 | 6.4 | 6.3 | 6.5 | 6.5 |
192-
| Windows | PyQt5 | 5.9 | 5.15 | 5.15 | 5.15 (with extras) |
193-
| | PyQt6 | skip (unavailable) | 6.2 | skip (unavailable) | 6.5 (with extras) |
194-
| | PySide2 | 5.13 | 5.12 | 5.15 | skip (no wheels available) |
195-
| | PySide6 | skip (test hang with 6.4. 6.5 unavailable) | 6.2 | 6.5 | 6.5 |
196-
| MacOS | PyQt5 | 5.12 | 5.15 | 5.15 | 5.15 (with extras) |
197-
| | PyQt6 | skip (unavailable) | 6.3 | skip (unavailable) | 6.5 (with extras) |
198-
| | PySide2 | 5.13 | 5.12 | 5.15 | skip (no wheels available) |
199-
| | PySide6 | 6.4 | 6.3 | 6.5 | 6.5 |
185+
| | Python | 3.9 | | 3.11 | | 3.13 | |
186+
|---------|-----------------|--------------------|------|--------------------|----------------------------|--------------------|----------------------------|
187+
| OS | Binding / manager | conda | pip | conda | pip | conda | pip |
188+
| Linux | PyQt5 | 5.12 | 5.15 | 5.15 | 5.15 (with extras) | 5.15 | 5.15 |
189+
| | PyQt6 | skip (unavailable) | 6.5 | skip (unavailable) | 6.8 (with extras) | skip (unavailable) | 6.8 |
190+
| | PySide2 | 5.13 | 5.12 | 5.15 | skip (no wheels available) | skip (unavailable) | skip (no wheels available) |
191+
| | PySide6 | 6.5 | 6.5 | 6.8 | 6.8 | 6.8 | 6.8 |
192+
| Windows | PyQt5 | 5.12 | 5.15 | 5.15 | 5.15 (with extras) | 5.15 | 5.15 |
193+
| | PyQt6 | skip (unavailable) | 6.2 | skip (unavailable) | 6.8 (with extras) | skip (unavailable) | 6.8 |
194+
| | PySide2 | 5.13 | 5.15 | 5.15 | skip (no wheels available) | skip (unavailable) | skip (no wheels available) |
195+
| | PySide6 | 6.5 | 6.2 | 6.8 | 6.8 | 6.8 | 6.8 |
196+
| MacOS | PyQt5 | 5.12 | 5.15 | skip | 5.15 (with extras) | 5.15 | 5.15 |
197+
| | PyQt6 | skip (unavailable) | 6.2 | skip | 6.8 (with extras) | skip (unavailable) | 6.8 |
198+
| | PySide2 | 5.13 | 5.12 | skip | skip (no wheels available) | skip (unavailable) | skip (no wheels available) |
199+
| | PySide6 | 6.8 | 6.2 | skip | 6.8 | 6.8 | 6.8 |
200200

201201
**Note**: The mentioned extra packages for the PyQt bindings are the following:
202202

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77

88
[tool.black]
9-
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
9+
target-version = ['py39', 'py310', 'py311', 'py312']
1010
skip-string-normalization = true
1111
line-length = 79
1212
exclude = '''
@@ -88,7 +88,7 @@ exclude = [
8888
"*_vendor*",
8989
]
9090

91-
target-version = "py37"
91+
target-version = "py39"
9292
fix = true
9393

9494

qtpy/tests/test_qtgui.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
QtGui,
1616
QtWidgets,
1717
)
18-
from qtpy.tests.utils import not_using_conda
1918

2019

2120
def test_qfontmetrics_width(qtbot):
@@ -27,8 +26,8 @@ def test_qfontmetrics_width(qtbot):
2726
font_metricsF = QtGui.QFontMetricsF(font)
2827
width = font_metrics.width("Test")
2928
widthF = font_metricsF.width("Test")
30-
assert width in range(40, 62)
31-
assert 39 <= widthF <= 63
29+
assert width in range(39, 62)
30+
assert 38 <= widthF <= 63
3231

3332

3433
def test_qdrag_functions(qtbot):

qtpy/tests/test_uic.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def test_load_ui_type(qtbot):
7878
category=DeprecationWarning,
7979
message=".*mode.*",
8080
)
81+
warnings.filterwarnings(
82+
"ignore",
83+
category=ResourceWarning,
84+
message=".*mode.*",
85+
) # Needed for PySide2 5.13
8186
ui_type, ui_base_type = uic.loadUiType(
8287
os.path.join(os.path.dirname(__file__), "test.ui"),
8388
)

setup.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ classifiers =
2323
Operating System :: OS Independent
2424
Programming Language :: Python :: 3
2525
Programming Language :: Python :: 3 :: Only
26-
Programming Language :: Python :: 3.7
27-
Programming Language :: Python :: 3.8
2826
Programming Language :: Python :: 3.9
2927
Programming Language :: Python :: 3.10
3028
Programming Language :: Python :: 3.11
29+
Programming Language :: Python :: 3.12
30+
Programming Language :: Python :: 3.13
3131
Topic :: Software Development :: Libraries
3232
Topic :: Software Development :: User Interfaces
3333
Topic :: Software Development :: Widget Sets
@@ -41,7 +41,7 @@ project_urls =
4141
packages = find:
4242
install_requires =
4343
packaging
44-
python_requires = >=3.7
44+
python_requires = >=3.9
4545
include_package_data = True
4646
zip_safe = False
4747

0 commit comments

Comments
 (0)