custom setter/getters and inheritance

Bug #234810 reported by Jan Jokela
4
Affects Status Importance Assigned to Milestone
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
Medium
Ubuntu Desktop Bugs
Hardy
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Creating two classes with GObject properties defining custom setters/getters and making the second inheriting the first doesn't work.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gobject_bug.py", line 15, in <module>
    class Test2(Test):
  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 'gobject_bug.Test2'> defines do_get/set_property and it also uses a property which a custom setter or getter. This is not allowed

Sample code follows as attachment.

Ubuntu hardy heron.

Revision history for this message
Jan Jokela (janjokela) wrote :
Revision history for this message
Jan Jokela (janjokela) wrote :

Seems like this issue might have been fixed in the following revision (which apparently didn't make the package shipped in hardy).
Please confirm this.

http://bazaar.launchpad.net/~vcs-imports/pygobject/trunk/revision?start_revid=vcs-imports%40canonical.com-20080321180656-9kwftt8ks2fhk2st&filter_file_id=teststest_properties-20070521120712-eso1u1esbwm7dxiw-57

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report

Changed in pygobject:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: New → Fix Committed
Changed in pygobject:
status: Unknown → Fix Released
Revision history for this message
Jan Jokela (janjokela) wrote :

Excuse me for the possibly stupid question.
Since Hardy is an LTS wouldn't it be possible to deploy an updated package of pygobject with this and possible other gobject bug fixes?
This is a deal breaker for deploying gobject based python applications.

Revision history for this message
Sebastien Bacher (seb128) wrote :

there has been no user request for a backport nor bugs on other softwares due to that so far, I've started to look at the pygobject update but had issue building it and it's not a priority on the list right now

Revision history for this message
Sebastien Bacher (seb128) wrote :

the new version is in intrepid

Changed in pygobject:
status: Fix Committed → Fix Released
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in pygobject:
status: Confirmed → Fix Committed
Revision history for this message
Steve Beattie (sbeattie) wrote :

Using the test case, I've reproduced the error with the version of pygobject (python-gobject-2.14.2-0ubuntu1) in hardy 8.04. I've verified that the version in hardy-proposed, 2.14.1-2ubuntu2, does indeed pass the test case. I also attempted to catch regressions by using gedit, an application that claims to directly depend on python-gobject, and saw nothing out of the ordinary.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in pygobject:
status: Fix Committed → Fix Released
Changed in pygobject:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.