[pygobject] Rename gi.types.GIObjectMeta to gi.types.GObjectMeta



commit b12ceed8cc5fa398cea2061813aac6a5ba100b6f
Author: Simon Feltman <sfeltman src gnome org>
Date:   Thu Jan 23 17:19:12 2014 -0800

    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).

 gi/module.py |    8 ++++----
 gi/types.py  |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gi/module.py b/gi/module.py
index 0032774..8c25fd7 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 0ccfe27..4f0d76e 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:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]