diff options
author | Christian Tismer <tismer@stackless.com> | 2022-04-10 17:22:14 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2022-05-22 19:27:18 +0200 |
commit | 37b5b3e2db07d4256aa17376d231a76ea3c393cd (patch) | |
tree | fb70156b3e9525a469708c7119a2f25b65c8e6b1 /testing | |
parent | 31deae2a0ea3725d038433f6be91119865a8f399 (diff) |
PyEnum: Implement Switchable Qt Enums Using Python Enums
The mapping from Qt Enum to Python Enum was considered
to be difficult. Actually, it is easier than thought.
As a minimum invasive approach, this implementation
changes very little in the first place. The generation
process of enums stays almost unchanged, which simplifies
handling of the generated code very much.
At the end of each generated Enum, we call a special
function that grabs the newly generated enum, reads all
items and produces a Python class that replaces
the enum in-place.
We don't generate Python code, but the functional API to create
the new enums. There are lots of more optimizations possible,
but this concept solves the issue nice and quickly.
A harder problem was the need to map all QFlag structures
to enum.Flag structures from Python. This caused a sometimes
hacky coding because both the old and the new version are
supported. This will be totally cleaned up when we
remove the old implementation.
Pick-to: 6.3
Task-number: PYSIDE-1735
Change-Id: I66991312f2d7b137f110a4db30702b8f3bf518dd
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/wheel_tester.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/wheel_tester.py b/testing/wheel_tester.py index 160ef7d37..8fd43cd5b 100644 --- a/testing/wheel_tester.py +++ b/testing/wheel_tester.py @@ -335,7 +335,9 @@ def try_build_examples(): from PySide6 import __all__ as modules for modname in modules: - execute_script(src_path / f"{modname}.pyi") + # PYSIDE-1735: pyi files are no longer compatible with Python. + # XXX Maybe add a test with Mypy here? + pass # execute_script(src_path / f"{modname}.pyi") def run_wheel_tests(install_wheels, wheels_dir_name): |