[electrum] Qt6 transition, step 1: wrap PyQt5 with qtpy
Summary:
qtpy s a small abstraction layer that lets you write applications using a single API call to either PyQt or PySide. It aims at mimicking the Qt5 API, so this is a good first minimal step to transition to PyQt6 or PySide6 (with the added benefit that we now also support PySide2 for Qt5)
PyQt5 remains the default binding, so this does not change any behavior and is mostly (to the exception of some doc and requirements files) an automated replacement:
- PyQt5 -> qtpy
- QtCore.QT_VERSION_STR -> QtCore.version
- pyqtSignal -> Signal
- pyqtProperty -> Property
- pyqtSlot -> Slot
- pyqtBoundSignal -> SignalInstance
This is a the minimal diff to make the code work with qtpy while still using PyQt5. In a following step we will make the necessary changes to be compatible also with PyQt6 and PySide6
Test Plan:
run all tests (but coverage is nonexistent for the GUI/qt package)
Run the application and do some basic transaction spending / receiving tests
Build the AppImage and windows .exe release, check that it runs
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18306