-
Notifications
You must be signed in to change notification settings - Fork 25
Preliminary Qt6 support #467
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since this is vendored in via `gridsync/qtreactor.py`
Required for Python 3.10+
Since docker is more readily available for older systems -- and because it is common to alias "docker" to "podman" on systems that do have it.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds preliminary support for Qt 6 by means of the "QtPy" shim/abstraction layer (which aims to provide a common API between different Qt versions and their bindings). Accordingly, most of the code-changes here consist of rather trivial updates to
importstatements (i.e., to import Qt-related classes from theqtpypackage instead ofPyQt5), however, some additional changes were needed along the way to ensure working compatibility between Qt5 and Qt6 (such as replacing the old QtDBus-based Linux desktop notification provider with atxdbus-based one, accounting for removed or renamed Qt enums and constants in Qt6, and adding/updating container images to facilitate reproducible Qt6-based builds/deployments).With this PR landed, switching out Gridsync's underlying Qt binding/library is simply a matter of setting a
QT_APIenvironment variable to the name of any API currently supported by QtPy -- which must be one ofpyqt5,pyqt6,pyside2orpyside6-- and installing, testing, building, or launching the application normally. For example:Note that, as per the above, this support for different Qt bindings is intended to be preliminary; Gridsync will continue to use and ship with PyQt5 for the foreseeable future (and will default to using PyQt5 in any/all contexts where
QT_APIis unset). The purpose of this PR is mainly to enforce writing binding-agnostic code in order to facilitate CI/testing against forthcoming versions of Qt so that potential compatibility issues can be identified and addressed as early as possible. (To this end, this PR also updates the project's GitHub Actions configuration to run all workflows against both PyQt5 and PyQt6; all tests are passing with both versions).