From 423ee853dfbb4ee9ed89a21e1cf2b6a928e2fc4d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 22 Apr 2013 17:40:51 +0100 Subject: Use GObject.__class__ instead of GObjectMeta In pygobject 3.8, GObjectMeta is no longer available via gi.repository.GObject. What we actually want is "the metaclass of GObject", so, say so. --- NEWS | 3 +++ dbus/gi_service.py | 4 ++-- dbus/gobject_service.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9a951e4..2515a46 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,9 @@ Fixes: • Add support for Unix compilers not supporting 'inline', for completeness +• Use GObject.__class__ instead of GObjectMeta, which can no longer be + imported from gi.repository.GObject in pygobject 3.8 + D-Bus Python Bindings 1.1.1 (2012-06-25) ======================================== diff --git a/dbus/gi_service.py b/dbus/gi_service.py index 924442f..2703289 100644 --- a/dbus/gi_service.py +++ b/dbus/gi_service.py @@ -37,12 +37,12 @@ import dbus.service # `ExportedGObjectType` as its metaclass, which is sufficient to make it work # correctly. -class ExportedGObjectType(GObject.GObjectMeta, dbus.service.InterfaceType): +class ExportedGObjectType(GObject.GObject.__class__, dbus.service.InterfaceType): """A metaclass which inherits from both GObjectMeta and `dbus.service.InterfaceType`. Used as the metaclass for `ExportedGObject`. """ def __init__(cls, name, bases, dct): - GObject.GObjectMeta.__init__(cls, name, bases, dct) + GObject.GObject.__class__.__init__(cls, name, bases, dct) dbus.service.InterfaceType.__init__(cls, name, bases, dct) diff --git a/dbus/gobject_service.py b/dbus/gobject_service.py index 1c96546..ef16009 100644 --- a/dbus/gobject_service.py +++ b/dbus/gobject_service.py @@ -40,12 +40,12 @@ else: import dbus.service -class ExportedGObjectType(gobject.GObjectMeta, dbus.service.InterfaceType): +class ExportedGObjectType(gobject.GObject.__class__, dbus.service.InterfaceType): """A metaclass which inherits from both GObjectMeta and `dbus.service.InterfaceType`. Used as the metaclass for `ExportedGObject`. """ def __init__(cls, name, bases, dct): - gobject.GObjectMeta.__init__(cls, name, bases, dct) + gobject.GObject.__class__.__init__(cls, name, bases, dct) dbus.service.InterfaceType.__init__(cls, name, bases, dct) class ExportedGObject(gobject.GObject, dbus.service.Object): -- cgit v1.2.1