summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-04-22 17:40:51 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-04-22 17:40:51 +0100
commit423ee853dfbb4ee9ed89a21e1cf2b6a928e2fc4d (patch)
tree7898fcda8135154597eaa716f465ce79a6dcf593
parentc9ad0a3909c80c09d33b21db6cb46cfee4489010 (diff)
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.
-rw-r--r--NEWS3
-rw-r--r--dbus/gi_service.py4
-rw-r--r--dbus/gobject_service.py4
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):