#1115481 gnome-tweaks: should import DesktopAppInfo from gi.repository.GioUnix

#1115481#5
Date:
2025-09-17 10:24:43 UTC
From:
To:
Dear Maintainer,

try to start gnome-tweaks. On command line it shows me this output:
Traceback (most recent call last):
  File "/usr/bin/gnome-tweaks", line 100, in <module>
    from gtweak.app import GnomeTweaks
  File "/usr/lib/python3/dist-packages/gtweak/app.py", line 13, in <module>
    from gtweak.tweakview import Window
  File "/usr/lib/python3/dist-packages/gtweak/tweakview.py", line 20, in
<module>
    from gtweak.tweaks.tweak_group_startup import TWEAK_GROUP as
StartupApplicationTweaks
  File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py",
line 348, in <module>
    TWEAK_GROUP = AutostartTweakGroup()
  File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py",
line 243, in __init__
    self._startup_dapps = self._get_startup_desktop_files()
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py",
line 323, in _get_startup_desktop_files
    dappinfo = Gio.DesktopAppInfo.new_from_filename(file)
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 37, in
__getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 127, in __getattr__
    raise AttributeError("%r object has no attribute %r" % (
                         self.__name__, name))
AttributeError: 'gi.repository.Gio' object has no attribute 'DesktopAppInfo'

#1115481#10
Date:
2025-09-17 11:19:44 UTC
From:
To:
Control: retitle -1 gnome-tweaks: should import DesktopAppInfo from gi.repository.GioUnix
Control: severity -1 normal
Control: tags -1 experimental
...

This is #1115350, which is fixed in unstable but not yet fixed in
experimental.

Ideally gnome-tweaks should switch from Gio.DesktopAppInfo to
GioUnix.DesktopAppInfo to avoid a deprecation warning, but that wouldn't
be urgent if you weren't using the pygobject from experimental.

The pygobject in experimental is known not to be ready yet (#1099164),
which is why it's only in experimental and not in unstable.

     smcv