Ubiquity fails to build with GTK4

Bug #1936488 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

With latest updates applied on impish Ubiquity fails to build with:

make: Leaving directory '/home/j-lallement/shared/Ubuntu/Dev/ubiquity/src'
/home/j-lallement/shared/Ubuntu/Dev/ubiquity/tests/test_gtkwidgets.py:9: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, TimezoneMap
/home/j-lallement/shared/Ubuntu/Dev/ubiquity/tests/test_usersetup.py:6: PyGIWarning: UbiquityMockResolver was imported without specifying a version first. Use gi.require_version('UbiquityMockResolver', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import UbiquityMockResolver
Traceback (most recent call last):
  File "/home/j-lallement/shared/Ubuntu/Dev/ubiquity/./tests/run", line 121, in <module>
    suite = unittest.TestLoader().loadTestsFromNames(tests)
  File "/usr/lib/python3.9/unittest/loader.py", line 220, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.9/unittest/loader.py", line 220, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python3.9/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "/home/j-lallement/shared/Ubuntu/Dev/ubiquity/tests/test_usersetup.py", line 9, in <module>
    from ubiquity import gtkwidgets, plugin_manager
  File "/home/j-lallement/shared/Ubuntu/Dev/ubiquity/./ubiquity/gtkwidgets.py", line 38, in <module>
    class StylizedFrame(Gtk.Alignment):
  File "/usr/lib/python3/dist-packages/gi/overrides/__init__.py", line 32, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib/python3/dist-packages/gi/module.py", line 123, in __getattr__
    raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gtk' object has no attribute 'Alignment'

It should be fixed by setting the version of GTK to 3

Changed in ubiquity (Ubuntu):
importance: Undecided → High
importance: High → Critical
tags: added: rls-ii-incoming
Changed in ubiquity (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 21.10.5

---------------
ubiquity (21.10.5) impish; urgency=medium

  * tests/test_gtkwidgets.py, ubiquity/frontend/gtk_ui.py:
    - use gi.require_version to ensure we import the right gtk bindings
      (lp: #1936488)

 -- Sebastien Bacher <email address hidden> Fri, 16 Jul 2021 16:03:27 +0200

Changed in ubiquity (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.