SG-30385 Add runtime PySide version detection and LGPL attribution in About Box#215
Draft
julien-lang wants to merge 1 commit intomasterfrom
Draft
SG-30385 Add runtime PySide version detection and LGPL attribution in About Box#215julien-lang wants to merge 1 commit intomasterfrom
julien-lang wants to merge 1 commit intomasterfrom
Conversation
…tection Replace hardcoded PySide2/PySide6 version strings in the Licenses dialog with a dynamically generated LGPL attribution block that detects the actually installed PySide version at runtime. Changes: - licenses.py: add get_pyside_license_html() classmethod that imports PySide at runtime and fills the LBP-approved Qt LGPL wording with the real version. Add get_license_html() classmethod that combines the static base HTML with the dynamic attribution. __init__ now calls get_license_html() instead of reading the file directly. Both classmethods are intentionally overridable to allow tk-framework-desktopstartup to inject the correct version on older tk-desktop builds (see SG-42871 compatibility shim in desktopstartup). - licenses.html: remove the three hardcoded PySide2/PySide6 sections (v5.15.0, v6.2.1, v6.5.3). These are now generated dynamically.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #215 +/- ##
==========================================
- Coverage 20.08% 19.98% -0.11%
==========================================
Files 69 69
Lines 4789 4814 +25
==========================================
Hits 962 962
- Misses 3827 3852 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
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.
Fixes the Qt license compliance issue in the About box Licenses dialog.
Changes
get_pyside_license_html()classmethod that detects the installed PySide6/PySide2 version at runtime and injects it into the LBP-approved LGPL boilerplate. Addget_license_html()classmethod combining the static base with the dynamic attribution. Both methods are intentionally overridable (see companion PR in tk-framework-desktopstartup).Why
See SG-42871 for full context. Short version: the About box had hardcoded PySide version strings that were stale and showed outdated Qt attribution regardless of what SGD actually ships. This is a compliance concern.
Compatibility
This is Part 1 of a two-part fix. New tk-desktop handles LGPL attribution itself via runtime detection. The companion PR in tk-framework-desktopstartup (Part 2) covers the case where a new SGD runs with an old tk-desktop that does not yet have this fix.