summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Dahlin <jdahlin@async.com.br>2007-08-27 16:03:55 +0000
committerJohan Dahlin <johan@src.gnome.org>2007-08-27 16:03:55 +0000
commit718e09c6897666b804e7e39b8f4bd5cd9eb030a7 (patch)
tree420f2b51f6640f8866338a9cf57ad6cdbd803f82
parentf66505b9e43226d731fefdfd37325f411f7e0de1 (diff)
downloadpygobject-718e09c6897666b804e7e39b8f4bd5cd9eb030a7.tar.gz
pygobject-718e09c6897666b804e7e39b8f4bd5cd9eb030a7.tar.xz
pygobject-718e09c6897666b804e7e39b8f4bd5cd9eb030a7.zip
Avoid exporting the metaclass, just define it where it will be used.
2007-08-27 Johan Dahlin <jdahlin@async.com.br> * gobject/propertyhelper.py (property.__metaclass__.__repr__): Avoid exporting the metaclass, just define it where it will be used. svn path=/trunk/; revision=700
-rw-r--r--ChangeLog3
-rw-r--r--gobject/propertyhelper.py9
2 files changed, 6 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a80343..39037d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-08-27 Johan Dahlin <jdahlin@async.com.br>
+ * gobject/propertyhelper.py (property.__metaclass__.__repr__): Avoid
+ exporting the metaclass, just define it in the class.
+
* gobject/__init__.py (GObjectMeta._install_properties):
Refactor a bit to make sure that it is possible to use in subclasses,
fixes #470718 (Marco Giusti)
diff --git a/gobject/propertyhelper.py b/gobject/propertyhelper.py
index cc987ec..9fd0413 100644
--- a/gobject/propertyhelper.py
+++ b/gobject/propertyhelper.py
@@ -33,11 +33,6 @@ from gobject.constants import \
G_MAXULONG
-class PropertyMeta(type):
- def __repr__(self):
- return "<class 'gobject.property'>"
-
-
class property(object):
"""
Creates a new property which in conjunction with GObjectMeta will
@@ -53,7 +48,9 @@ class property(object):
'value'
"""
- __metaclass__ = PropertyMeta
+ class __metaclass__(type):
+ def __repr__(self):
+ return "<class 'gobject.property'>"
def __init__(self, getter=None, setter=None, type=None, default=None,
nick='', blurb='', flags=_gobject.PARAM_READWRITE,