does not work with PyGObject 3.7.2: AttributeError: 'gi.repository.GObject' object has no attribute 'GObjectMeta'

Bug #1080736 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aptdaemon
New
Undecided
Unassigned
aptdaemon (Debian)
Fix Released
Unknown

Bug Description

aptdaemon currently does some curious hack with subclassing from GObject.GObjectMeta, which stops working with PyGObject 3.7.2:

$ PYTHONPATH=.:~/upstream/pygobject ./gtk3-demo.py
Traceback (most recent call last):
  File "./gtk3-demo.py", line 37, in <module>
    import aptdaemon.client
  File "/home/martin/upstream/aptdaemon/aptdaemon/client.py", line 70, in <module>
    class MemoizedMixInMeta(MemoizedTransaction, GObject.GObjectMeta):
  File "/home/martin/upstream/pygobject/gi/module.py", line 316, in __getattr__
    return getattr(self._introspection_module, name)
  File "/home/martin/upstream/pygobject/gi/module.py", line 135, in __getattr__
    self.__name__, name))
AttributeError: 'gi.repository.GObject' object has no attribute 'GObjectMeta'

(This is also thrown by the tests).

I'm afraid I don't fully understand what MemoizedMixInMeta and MemoizedMixIn are supposed to do; it can certainly be fixed to work with current PyGObject, or preferrably with not using the "GObjectMeta" internal implementation detail in the first place; however, this class is used exactly once, so it seems easier to just move the overridden __call__() method into AptTransaction and drop the black magic?

Related branches

Revision history for this message
Martin Pitt (pitti) wrote :

With the attached branch aptdaemon works with all PyGObject versions. The aptdaemon test suite shows identical behaviour (failures=4, errors=1, skipped=4; same failures) with both current aptdaemon and pygobject 3.4.2, as well as this fixed aptdaemon and pygobject 3.7.2.

Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

Already fixed upstream.

Changed in aptdaemon (Debian):
status: Unknown → 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.