After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523352 - only one class in a hierarchy can use new style properties with custom getters or setters
only one class in a hierarchy can use new style properties with custom getter...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
2.14.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-19 12:16 UTC by Tomeu Vizoso
Modified: 2008-03-21 18:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.06 KB, text/plain)
2008-03-19 12:17 UTC, Tomeu Vizoso
Details

Description Tomeu Vizoso 2008-03-19 12:16:33 UTC
If you try to do so, you'll get this error:

Traceback (most recent call last):
  • File "/home/tomeu/Desktop/test_new_properties.py", line 14 in <module>
    class Child(Parent):
  • File "/var/lib/python-support/python2.5/gtk-2.0/gobject/__init__.py", line 40 in __init__
    cls._install_properties()
  • File "/var/lib/python-support/python2.5/gtk-2.0/gobject/__init__.py", line 68 in _install_properties
    " or getter. This is not allowed" % (cls,))
TypeError: GObject subclass <class '__main__.Child'> defines do_get/set_property and it also uses a property which a custom setter or getter. This is not allowed

Will attach a test case.
Comment 1 Tomeu Vizoso 2008-03-19 12:17:47 UTC
Created attachment 107599 [details]
testcase
Comment 2 Johan (not receiving bugmail) Dahlin 2008-03-21 18:08:27 UTC
2008-03-21  Johan Dahlin  <johan@gnome.org>

        * gobject/__init__.py:
        * tests/test_properties.py:
        Allow gobject.property work with subclasses. Add tests.

        (#523352, Tomeu Vizoso)