Skip to content

Commit a6f369e

Browse files
committed
Remove Cy2020 support
This adds several common members that had to be excluded when supporting Qt 5.13. Remove py 3.7 specific pathlib workarounds.
1 parent 04f44da commit a6f369e

File tree

4 files changed

+26
-36
lines changed

4 files changed

+26
-36
lines changed

.github/workflows/run-tox.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# membership-end combines binding/py data into common membership report
3131
run: |
3232
which tox
33-
tox -e membership-py37-PySide5.13,membership-py37-PyQt5.13,membership-py39-PySide5.15,membership-py39-PyQt5.15,membership-py311-PySide6.5,membership-py311-PyQt6.7,membership-end
33+
tox -e membership-py39-PySide5.15,membership-py39-PyQt5.15,membership-py311-PySide6.5,membership-py311-PyQt6.7,membership-end
3434
ls -lha .members
3535
3636
- name: Upload membership report
@@ -47,9 +47,6 @@ jobs:
4747
strategy:
4848
matrix:
4949
test_env: [
50-
# Cy2020
51-
'test-py37-PySide5.13',
52-
'test-py37-PyQt5.13',
5350
# Cy2021
5451
'test-py39-PySide5.15',
5552
'test-py39-PyQt5.15',

src/Qt.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"QBuffer",
9999
"QByteArray",
100100
"QByteArrayMatcher",
101+
"QCalendar",
101102
"QCborError",
102103
"QCborKnownTags",
103104
"QCborSimpleType",
@@ -114,6 +115,7 @@
114115
"QDataStream",
115116
"QDate",
116117
"QDateTime",
118+
"QDeadlineTimer",
117119
"QDir",
118120
"QDirIterator",
119121
"QDynamicPropertyChangeEvent",
@@ -172,6 +174,7 @@
172174
"QReadWriteLock",
173175
"QRect",
174176
"QRectF",
177+
"QRecursiveMutex",
175178
"QRegularExpression",
176179
"QRegularExpressionMatch",
177180
"QRegularExpressionMatchIterator",
@@ -252,6 +255,8 @@
252255
"QClipboard",
253256
"QCloseEvent",
254257
"QColor",
258+
"QColorConstants",
259+
"QColorSpace",
255260
"QConicalGradient",
256261
"QContextMenuEvent",
257262
"QCursor",
@@ -333,6 +338,7 @@
333338
"QRasterWindow",
334339
"QRawFont",
335340
"QRegion",
341+
"QRegularExpressionValidator",
336342
"QResizeEvent",
337343
"QScreen",
338344
"QScrollEvent",
@@ -404,8 +410,10 @@
404410
"QHelpEngineCore",
405411
"QHelpFilterData",
406412
"QHelpFilterEngine",
413+
"QHelpFilterSettingsWidget",
407414
"QHelpIndexModel",
408415
"QHelpIndexWidget",
416+
"QHelpLink",
409417
"QHelpSearchEngine",
410418
"QHelpSearchQuery",
411419
"QHelpSearchQueryWidget",
@@ -570,7 +578,8 @@
570578
"QRemoteObjectNode",
571579
"QRemoteObjectRegistry",
572580
"QRemoteObjectRegistryHost",
573-
"QRemoteObjectReplica"
581+
"QRemoteObjectReplica",
582+
"QRemoteObjectSourceLocationInfo"
574583
],
575584
"QtSensors": [
576585
"QAccelerometer",
@@ -626,6 +635,10 @@
626635
"QTiltSensor",
627636
"qoutputrange"
628637
],
638+
"QtSerialPort": [
639+
"QSerialPort",
640+
"QSerialPortInfo"
641+
],
629642
"QtSql": [
630643
"QSql",
631644
"QSqlDatabase",
@@ -650,6 +663,10 @@
650663
"QtTest": [
651664
"QTest"
652665
],
666+
"QtTextToSpeech": [
667+
"QTextToSpeech",
668+
"QVoice"
669+
],
653670
"QtWebChannel": [
654671
"QWebChannel",
655672
"QWebChannelAbstractTransport"
@@ -874,10 +891,8 @@
874891
875892
"""
876893
_common_members_sources = [
877-
"PyQt5-5.13.2_py-3.7.9",
878894
"PyQt5-5.15.11_py-3.9.13",
879895
"PyQt6-6.7.1_py-3.11.9",
880-
"PySide2-5.13.2_py-3.7.9",
881896
"PySide2-5.15.2.1_py-3.9.13",
882897
"PySide6-6.5.3_py-3.11.9"
883898
]

tests.py

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -405,24 +405,6 @@ def get_enum(cls, namespace, enum):
405405
return getattr(cls, enum)
406406

407407

408-
def subprocess_run(cmd, **kwargs):
409-
"""Work around python 3.7 not supporting passing pathlib objects to cmd.
410-
TODO: Remove once we drop python 3.7 support.
411-
"""
412-
if sys.version_info < (3, 8) and not isinstance(cmd, str):
413-
cmd = [str(c) for c in cmd]
414-
return subprocess.run(cmd, **kwargs)
415-
416-
417-
def subprocess_check_output(cmd, **kwargs):
418-
"""Work around python 3.7 not supporting passing pathlib objects to cmd.
419-
TODO: Remove once we drop python 3.7 support.
420-
"""
421-
if sys.version_info < (3, 8) and not isinstance(cmd, str):
422-
cmd = [str(c) for c in cmd]
423-
return subprocess.check_output(cmd, **kwargs)
424-
425-
426408
@contextlib.contextmanager
427409
def ignoreQtMessageHandler(msgs):
428410
"""A context that ignores specific qMessages for all bindings
@@ -1478,14 +1460,14 @@ def test_convert_enum():
14781460
fle.write(enum_file_2)
14791461

14801462
cmd = [sys.executable, code_path, old_code_dir]
1481-
output = subprocess_check_output(cmd, cwd=self.tempdir, universal_newlines=True)
1463+
output = subprocess.check_output(cmd, cwd=self.tempdir, universal_newlines=True)
14821464

14831465
assert enum_check in output
14841466

14851467
# Check using the "--check" command outputs the same text but uses
14861468
# the return code for the number of enums being changed.
14871469
try:
1488-
output = subprocess_check_output(
1470+
output = subprocess.check_output(
14891471
cmd + ["--check"], cwd=self.tempdir, universal_newlines=True
14901472
)
14911473
except subprocess.CalledProcessError as error:
@@ -1496,12 +1478,12 @@ def test_convert_enum():
14961478

14971479
# Test actually updating the files.
14981480
cmd.append("--write")
1499-
output = subprocess_check_output(cmd, cwd=self.tempdir, universal_newlines=True)
1481+
output = subprocess.check_output(cmd, cwd=self.tempdir, universal_newlines=True)
15001482
assert enum_check in output
15011483

15021484
# "--check" is respected in --write mode
15031485
try:
1504-
output = subprocess_check_output(
1486+
output = subprocess.check_output(
15051487
cmd + ["--check"], cwd=self.tempdir, universal_newlines=True
15061488
)
15071489
except subprocess.CalledProcessError as error:
@@ -1522,7 +1504,7 @@ def test_convert_enum():
15221504
assert fle.read() == check
15231505

15241506
# Check using `--partial`
1525-
output = subprocess_check_output(
1507+
output = subprocess.check_output(
15261508
cmd + ["--partial", "-v"], cwd=self.tempdir, universal_newlines=True
15271509
)
15281510
check = textwrap.dedent(
@@ -1540,7 +1522,7 @@ def test_convert_enum_map():
15401522
"""Test enum map generation for conversion from short to long enums"""
15411523
code_path = REPO_ROOT / "src" / "Qt_convert_enum.py"
15421524
cmd = [sys.executable, code_path, "--show", "map"]
1543-
proc = subprocess_run(
1525+
proc = subprocess.run(
15441526
cmd,
15451527
stdout=subprocess.PIPE,
15461528
check=True,
@@ -1561,7 +1543,7 @@ def test_convert_enum_modules():
15611543
"""Test enum map generation modules data structure"""
15621544
code_path = REPO_ROOT / "src" / "Qt_convert_enum.py"
15631545
cmd = [sys.executable, code_path, "--show", "modules"]
1564-
proc = subprocess_run(
1546+
proc = subprocess.run(
15651547
cmd,
15661548
stdout=subprocess.PIPE,
15671549
check=True,

tox.ini

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ envlist =
99
# VFX Reference Platform specific builds(Officially supported by Qt.py)
1010
# Note: Github action/tox testing is limited to just 1 reference python
1111
# version per Qt binding to simplify the generated markdown tables.
12-
# Cy2020
13-
membership-py37-{PySide,PyQt}5.13
1412
# Cy2022
1513
membership-py39-{PySide,PyQt}5.15
1614
# Cy2023
@@ -33,8 +31,6 @@ envlist =
3331
# Pre-Generate files for other tests to work around parallelization issues
3432
test-begin
3533
# VFX Reference Platform specific builds(Officially supported by Qt.py)
36-
# Cy2020
37-
test-py37-{PySide,PyQt}5.13-{impl,caveats,examples}
3834
# Cy2021
3935
test-py39-{PySide,PyQt}5.15-{impl,caveats,examples}
4036
# Cy2022

0 commit comments

Comments
 (0)