The primary causes of the issue is the manipulation of how the gog_cloud.py and gog_cloud_hooks.py was getting imported in UnitTest via the importlib mechanism. That seemed to have broken the resolution of paths to `lutris.services.*`.
As the GTK issues that it was trying to side step has been fixed at the `tests` root level, the workaround is no longer needed.
Additional changes have been added to help harden any potentially UnitTest environment and circular import issues.
* Updated the github unit test run to use a virtual env to install the package dependencies and run the test
* Moved the imports of `lutris.services` subpackage to the method calls inside of the `__init__.py` script which will defer any potential circular imports until after the `lutris/services/__init__.py` script is fully imported.
This means that very module must be explicitly loaded by various tests that need the 'gi.requires_versions' part- they no longer sometimes get this by accident (sometimes).
In turn, _test_cloud_save_progress will no longer stub stuff in sys.modules, which is awful- it breaks later tests. That in turns makes it much chattier since it now actually logs stuff. But it seems to pass for all that.
Yikes!
Resolves#6570
Much research and drudgery done by Claude Code 🤖 before it clocked out.
Integrate heroic-gogdl as a runtime component to download GOG games
directly from GOG's depot/CDN system (the same backend GOG Galaxy uses),
offering faster downloads and incremental updates compared to offline
installers.
Changes:
- New `gogdl_setup` installer command for depot downloads
- Auth bridge between Lutris GOG tokens and gogdl's format
- Depot installer offered as primary, offline installer as fallback
- Post-install game detection from goggame-*.info (DOSBox, ScummVM,
Wine, native)
- Progress bar in the installer window during depot downloads
- Incremental depot updates for depot-installed games
- Handle expired GOG tokens gracefully (auto re-login via
AuthTokenExpiredError)
- Wine prefix set to $GAMEDIR/pfx, separate from game files
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
My MyPy complains about the use of a Python 3.9 feature (why?) and then does not detect any type errors! I fix the test so MyPy will detect my actual type annotation error.
And then I fix that.