FIX: Pinned platform specific versions of pyqt6 & pyqt6-qt6.#1203
FIX: Pinned platform specific versions of pyqt6 & pyqt6-qt6.#1203darikoneil wants to merge 1 commit intoMouseLand:mainfrom
Conversation
…ced breaking changes to dependencies that the distribution of pyqt6 does not properly handle. These breaking changes can result in a variety of strange errors during runtime due to missing or failing to load linked-libraries(e.g., xcb-cursor0). These errors can be "fixed" by users by manually installing these non-python libraries (e.g., sudo apt install), so they may not appear to be related or reported.
There was a problem hiding this comment.
Pull request overview
This PR addresses PyQt6 compatibility issues on Linux by pinning PyQt6 and PyQt6-Qt6 versions to <6.5 for Linux platforms, while allowing unrestricted versions for non-Linux platforms. Qt 6.5 introduced breaking changes that cause runtime errors on Linux due to missing or failing linked-libraries.
Key Changes
- Replaces the unconditional
pyqt6dependency with platform-specific versions - Pins
pyqt6<6.5andpyqt6-qt6<6.5for Linux platforms only - Allows unrestricted
pyqt6for non-Linux platforms
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'pyqt6 ; platform_system != "Linux"', | ||
| 'pyqt6<6.5 ; platform_system == "Linux"', | ||
| 'pyqt6-qt6<6.5 ; platform_system == "Linux"', |
There was a problem hiding this comment.
Inconsistent quote style: lines 19-21 use single quotes while line 22 uses double quotes. For consistency with the rest of the gui_deps list, these should use double quotes.
| 'pyqt6 ; platform_system != "Linux"', | |
| 'pyqt6<6.5 ; platform_system == "Linux"', | |
| 'pyqt6-qt6<6.5 ; platform_system == "Linux"', | |
| "pyqt6 ; platform_system != \"Linux\"", | |
| "pyqt6<6.5 ; platform_system == \"Linux\"", | |
| "pyqt6-qt6<6.5 ; platform_system == \"Linux\"", |
| 'pyqt6 ; platform_system != "Linux"', | ||
| 'pyqt6<6.5 ; platform_system == "Linux"', | ||
| 'pyqt6-qt6<6.5 ; platform_system == "Linux"', |
There was a problem hiding this comment.
The logic at lines 51-52, 58-59, and 65-66 that removes "pyqt6" from gui_deps will fail because "pyqt6" is no longer a simple string in the list. It has been replaced with conditional strings that include platform markers. This will cause the removal attempts to fail silently, which means PyQt5/PySide2/PySide6 installations will not prevent PyQt6 from being installed as intended. Consider updating the removal logic to handle the new conditional dependency strings, or refactor to check for existing Qt installations before defining gui_deps.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1203 +/- ##
==========================================
- Coverage 55.21% 54.89% -0.32%
==========================================
Files 43 43
Lines 5055 5064 +9
==========================================
- Hits 2791 2780 -11
- Misses 2264 2284 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0df2cc3 to
a993e7b
Compare
Qt 6.5 introduced breaking changes to dependencies that the distribution of pyqt6 does not properly handle for linux platforms. These breaking changes can result in a variety of strange errors during runtime due to missing or failing to load linked-libraries (e.g., xcb-cursor0). Users can "fix" these errors by manually installing non-python libraries (e.g.,
sudo apt install), so they may not appear to be related or reported. Feel free to just close this and add the constraints yourself if it's easier (it's only 3 lines).P.S.: In troubleshooting this for some colleagues, I came across some issues that might also be related to this in other MouseLand repo's (e.g., Kilosort #1001 and Cellpose #926).