summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-01-23 17:19:12 -0800
committerSimon Feltman <sfeltman@src.gnome.org>2014-01-23 17:53:20 -0800
commitb12ceed8cc5fa398cea2061813aac6a5ba100b6f (patch)
tree3310719086c73a6bc3384b562a8603b6ef002f9c
parent15fdd827ce4bff847fb35c817c6ea2d3650eec00 (diff)
downloadpygobject-b12ceed8cc5fa398cea2061813aac6a5ba100b6f.tar.gz
Rename gi.types.GIObjectMeta to gi.types.GObjectMeta
Rename GIObjectMeta to GObjectMeta reverting it to its original name prior to commit https://git.gnome.org/browse/pygobject/commit/?id=2624bd2b That change could have been considered an API break for anyone deriving from gi.types.GObjectMeta since it is essentially public API. Rename base meta class to _GObjectMetaBase which was previously gi._gobject before commit 2624bd2b (private API).
-rw-r--r--gi/module.py8
-rw-r--r--gi/types.py10
2 files changed, 9 insertions, 9 deletions
diff --git a/gi/module.py b/gi/module.py
index 0032774a..8c25fd70 100644
--- a/gi/module.py
+++ b/gi/module.py
@@ -57,7 +57,7 @@ from ._gi import \
flags_register_new_gtype_and_add, \
_gobject
from .types import \
- GIObjectMeta, \
+ GObjectMeta, \
StructMeta
GInterface = _gobject.GInterface
@@ -183,13 +183,13 @@ class IntrospectionModule(object):
interfaces = tuple(interface for interface in get_interfaces_for_object(info)
if not issubclass(parent, interface))
bases = (parent,) + interfaces
- metaclass = GIObjectMeta
+ metaclass = GObjectMeta
elif isinstance(info, CallbackInfo):
bases = (CCallback,)
- metaclass = GIObjectMeta
+ metaclass = GObjectMeta
elif isinstance(info, InterfaceInfo):
bases = (GInterface,)
- metaclass = GIObjectMeta
+ metaclass = GObjectMeta
elif isinstance(info, (StructInfo, UnionInfo)):
if g_type.is_a(TYPE_BOXED):
bases = (Boxed,)
diff --git a/gi/types.py b/gi/types.py
index 0ccfe27e..4f0d76ed 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -173,7 +173,7 @@ def find_vfunc_conflict_in_bases(vfunc, bases):
return None
-class GObjectMeta(type):
+class _GObjectMetaBase(type):
"Metaclass for automatically registering GObject classes"
def __init__(cls, name, bases, dict_):
type.__init__(cls, name, bases, dict_)
@@ -193,19 +193,19 @@ class GObjectMeta(type):
_gobject.type_register(cls, namespace.get('__gtype_name__'))
-_gobject._install_metaclass(GObjectMeta)
+_gobject._install_metaclass(_GObjectMetaBase)
-class GIObjectMeta(GObjectMeta, MetaClassHelper):
+class GObjectMeta(_GObjectMetaBase, MetaClassHelper):
def __init__(cls, name, bases, dict_):
- super(GIObjectMeta, cls).__init__(name, bases, dict_)
+ super(GObjectMeta, cls).__init__(name, bases, dict_)
is_gi_defined = False
if cls.__module__ == 'gi.repository.' + cls.__info__.get_namespace():
is_gi_defined = True
is_python_defined = False
- if not is_gi_defined and cls.__module__ != GIObjectMeta.__module__:
+ if not is_gi_defined and cls.__module__ != GObjectMeta.__module__:
is_python_defined = True
if is_python_defined: