Skip to content
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

hooks: qt: update hooks for PySide6/PyQt6 v6.5.0 #7549

Merged
merged 9 commits into from Apr 10, 2023

Conversation

rokm
Copy link
Member

@rokm rokm commented Apr 7, 2023

Update module definitions and add hooks for PySide6.QtLocation, PySide6.QtTextToSpeech, and PySide6.QtSerialBus, which were added in PySide6 6.5.0.

Add hook for PyQt6.QtTextToSpeech, which was introduced in PyQt6 6.4.x, and apparently flew under our radar because the basic import test works without the hook as well (the hook ensures that plugins are collected).

In test_QtNetwork_SSL_support we now first run a subpprocess to check if QtNetwork actually supports SSL; this is because QtNetwork in linux wheels for PySide6 6.5.0 requires OpenSSL 3, which is not available on the ubunut-20.04 runner that we use.

The QtWebEngine in PySide6 6.5.0 seems to be broken in virtualized environments due to lack of opengl32sw.dll in the Windows wheels. I've lodged a complaint (https://bugreports.qt.io/browse/PYSIDE-2289) to see if this is intentional, but in the meantime, we should skip those tests on Windows.

... and since apparently PyQt6 6.5.0 was released this morning, add the missing hook for PyQt6.QSpatialAudio and ensure that all our tests instantiate QCoreApplication/QGuiApplication/QApplication with sys.argv instead of an empty list, since the empty list seems to cause problems with QtWebEngine in PyQt6 6.5.0.

rokm added 9 commits April 7, 2023 15:36
Add hooks for `PySide6.QtLocation` and `PySide6.QtSerialBus` that
are available in 6.5.0, and update corresponding module definitions.

Also mark `QtPositioning` python module as available on all bindings,
since that seems to be the case (and has been for a while?).

As a side note, the preview of `PyQt6` 6.5.0 does not seem to
provide `QtLocation` nor `QtSerialBus` python modules (nor the
corresponding Qt shared libraries), so no change need to be made
for `PyQt6` yet.
Add dynamic check for SSL support, and skip the test if it is not
available (e.g., `QtNetwork` in `PySide6` 6.5.0 requires OpenSSL 3,
which is unavailable on `ubuntu-20.04` GA runner).

Also, have the test instantiate `QCoreApplication` to avoid a
warning.
The python module for QtTextToSpeech seems to be added in
PyQt6 6.4.0 and PySide6 6.5.0. The hooks ensure that plugins
are collected.
PySide6 6.5.0 PyPI wheels seem to be missing `opengl32sw.dll`,
which causes `QtWebEngine` applications in virtualized environments
to crash due to failure to initialize OpenGL context.
Looks like passing an empty list is causing problems with QtWebEngine
in PyQt6 6.5.0. And even if we can get away with it in other tests
and with other bindings, it makes more sense to properly pass
`sys.argv`, as one would in a real application. Applies to all
instantiations of `QCoreApplication`, `QGuiApplication`, and
`QApplication`.
Instantiate `QCoreApplication` with `sys.argv` instead of an empty
list to avoid potential issues in the future.
The python module for QtSpatialAudio was added in PyQt6 6.5.0.
@rokm rokm changed the title hooks: qt: update PySide6 hooks for PySide v6.5.0 hooks: qt: update hooks for PySide6/PyQt6 v6.5.0 Apr 10, 2023
@rokm rokm merged commit d2ea041 into pyinstaller:develop Apr 10, 2023
18 checks passed
@rokm rokm deleted the pyside6-6.5.0 branch April 10, 2023 22:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants