Debian Bug report logs - #484024
sugar init problem

version graph

Package: pygobject; Maintainer for pygobject is Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>;

Reported by: rafael@laptop.org

Date: Sun, 1 Jun 2008 22:55:11 UTC

Severity: important

Tags: patch

Fixed in version 2.14.2-1

Done: Josselin Mouette <joss@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://bugzilla.gnome.org/show_bug.cgi?id=523352

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian OLPC <debian-olpc-devel@lists.alioth.debian.org>, unknown-package@qa.debian.org:
Bug#484024; Package sugar - window manager from the olpc project. (full text, mbox, link).


Acknowledgement sent to rafael@laptop.org:
New Bug report received and forwarded. Copy sent to Debian OLPC <debian-olpc-devel@lists.alioth.debian.org>, unknown-package@qa.debian.org. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Rafael Enrique Ortiz Guerrero" <dirakx@gmail.com>
To: submit@bugs.debian.org
Subject: sugar init problem
Date: Sun, 1 Jun 2008 17:52:53 -0500
[Message part 1 (text/plain, inline)]
Package:sugar  -  window manager from the OLPC project
version:0.81.2-1


When executing sugar i get the following error.

Traceback (most recent call last):
  File "/usr/bin/sugar-shell", line 30, in <module>
    from main import main
  File "/usr/share/sugar/shell/main.py", line 34, in <module>
    import view.Shell
  File "/usr/share/sugar/shell/view/Shell.py", line 38, in <module>
    from view.frame import frame
  File "/usr/share/sugar/shell/view/frame/frame.py", line 30, in <module>
    from view.frame.activitiestray import ActivitiesTray
  File "/usr/share/sugar/shell/view/frame/activitiestray.py", line 22, in
<module>
    from sugar.graphics.tray import HTray
  File "/usr/lib/python2.5/site-packages/sugar/graphics/tray.py", line 22,
in <module>
    from sugar.graphics.palette import Palette, ToolInvoker
  File "/usr/lib/python2.5/site-packages/sugar/graphics/palette.py", line
906, in <module>
    class WidgetInvoker(Invoker):
  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 'sugar.graphics.palette.WidgetInvoker'>
defines do_get/set_property and it also uses a property which a custom
setter or getter. This is not allowed



-- 
Rafael Enrique Ortiz Guerrero
One Laptop Per Child
rafael@laptop.org
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian OLPC <debian-olpc-devel@lists.alioth.debian.org>, unknown-package@qa.debian.org:
Bug#484024; Package sugar - window manager from the olpc project. (full text, mbox, link).


Acknowledgement sent to Santiago Ruano Rincón <santiago@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian OLPC <debian-olpc-devel@lists.alioth.debian.org>, unknown-package@qa.debian.org. (full text, mbox, link).


Message #10 received at 484024@bugs.debian.org (full text, mbox, reply):

From: Santiago Ruano Rincón <santiago@debian.org>
To: Debian Bug Tracking System <484024@bugs.debian.org>
Subject: the same happens here
Date: Mon, 02 Jun 2008 11:13:23 +0200
Package: sugar
Version: 0.81.2-1
Followup-For: Bug #484024

	I have the same problem. I would say it's an serious bug, since
it renders sugar unsable.

Kind regards,

Santiago

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sugar depends on:
ii  dbus-x11                      1.2.1-2    simple interprocess messaging syst
ii  librsvg2-common               2.22.2-2   SAX-based renderer library for SVG
ii  matchbox-window-manager       1.2-1      window manager for resource-limite
ii  python                        2.5.2-1    An interactive high-level object-o
ii  python-cairo                  1.4.12-1   Python bindings for the Cairo vect
ii  python-central                0.6.7      register and build utility for Pyt
ii  python-dbus                   0.82.4-2   simple interprocess messaging syst
ii  python-gnome2-desktop         2.22.0-1   Python bindings for the GNOME desk
ii  python-gobject                2.14.1-6   Python bindings for the GObject li
ii  python-gst0.10                0.10.11-1  generic media-playing framework (P
ii  python-gtk2                   2.12.1-4   Python bindings for the GTK+ widge
ii  python-hippocanvas            0.2.23-4.1 Python bindings to hippo-canvas
ii  python-numpy                  1:1.0.4-8  Numerical Python adds a fast array
ii  python-simplejson             1.9.1-1    Simple, fast, extensible JSON enco
ii  python-sugar                  0.79.1-1   Sugar graphical shell - core funct
ii  python-sugar-toolkit          0.81.3-1   Sugar graphical shell - core widge
ii  python-telepathy              0.15.0-1   python language bindings for telep
ii  telepathy-gabble              0.7.6-1    Jabber/XMPP connection manager
ii  telepathy-salut               0.3.1-1    Link-local XMPP connection manager
ii  telepathy-stream-engine       0.5.2-1    stream handler for the Telepathy f

Versions of packages sugar recommends:
ii  gstreamer0.10-plug 0.10.8-2              GStreamer plugins from the "good" 
ii  net-tools          1.60-19               The NET-3 networking toolkit
ii  network-manager    0.6.6-1               network management framework daemo
ii  sugar-artwork      0.79.2-2              Sugar graphical shell - artwork
ii  x11-xserver-utils  7.3+3                 X server utilities
ii  xbase-clients      1:7.3+11              miscellaneous X clients - metapack
ii  xserver-xephyr     2:1.4.1~git20080517-1 nested X server

-- no debconf information




Bug reassigned from package `sugar - window manager from the olpc project' to `sugar'. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 11:36:02 GMT) (full text, mbox, link).


Severity set to `grave' from `normal' Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 11:36:03 GMT) (full text, mbox, link).


Merged 484024 484086. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 11:36:05 GMT) (full text, mbox, link).


Blocking bugs of 484086 added: Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 11:51:07 GMT) (full text, mbox, link).


Bug reassigned from package `sugar' to `pygobject'. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:06:06 GMT) (full text, mbox, link).


Severity set to `important' from `grave' Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:06:08 GMT) (full text, mbox, link).


Blocking bugs of 484086 added: 484024 and 484086 Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:06:11 GMT) (full text, mbox, link).


Blocking bugs of 484086 added: 484024 and 484086 Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:06:13 GMT) (full text, mbox, link).


Disconnected #484086 from all other report(s). Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:48:36 GMT) (full text, mbox, link).


Bug reassigned from package `pygobject' to `pygobject'. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 12:48:49 GMT) (full text, mbox, link).


Blocking bugs of 484024 removed: 484024 Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 17:06:08 GMT) (full text, mbox, link).


Blocking bugs of 484024 removed: 484024 Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 02 Jun 2008 17:06:09 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Josselin Mouette <joss@debian.org>:
Bug#484024; Package pygobject. (full text, mbox, link).


Acknowledgement sent to Santiago Ruano Rincón <santiago@debian.org>:
Extra info received and forwarded to list. Copy sent to Josselin Mouette <joss@debian.org>. (full text, mbox, link).


Message #39 received at 484024@bugs.debian.org (full text, mbox, reply):

From: Santiago Ruano Rincón <santiago@debian.org>
To: Debian Bug Tracking System <484024@bugs.debian.org>
Subject: patch
Date: Mon, 02 Jun 2008 23:46:56 +0200
Package: pygobject
Followup-For: Bug #484024

Content-Type: multipart/mixed; boundary="===============2093913649=="
MIME-Version: 1.0
From: =?utf-8?q?Santiago_Ruano_Rinc=C3=B3n?= <santiago@debian.org>
To: Debian Bug Tracking System <484024@bugs.debian.org>
Subject: patch
Message-ID: <20080602214420.6790.49529.reportbug@localhost.localdomain>
X-Mailer: reportbug 3.40
Date: Mon, 02 Jun 2008 23:44:20 +0200

This is a multi-part MIME message sent by reportbug.


--===============2093913649==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: pygobject
Followup-For: Bug #484024

Attached is the patch that solves the problem, taken from:

https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/234810

regards,

Santiago

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

--===============2093913649==
Content-Type: text/x-c++; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="484024.diff"

diff -urN pygobject-2.14.1.old/gobject/__init__.py pygobject-2.14.1/gobject/__init__.py
--- pygobject-2.14.1.old/gobject/__init__.py	2007-11-05 17:47:52.000000000 +0100
+++ pygobject-2.14.1/gobject/__init__.py	2008-06-02 23:27:26.000000000 +0200
@@ -57,15 +57,16 @@
 
         cls.__gproperties__ = gproperties
 
-        if (hasattr(cls, 'do_get_property') or
-            hasattr(cls, 'do_set_property')):
+        if ('do_get_property' in cls.__dict__ or
+            'do_set_property' in cls.__dict__):
             for prop in props:
                 if (prop.getter != prop._default_getter or
                     prop.setter != prop._default_setter):
                     raise TypeError(
                         "GObject subclass %r defines do_get/set_property"
                         " and it also uses a property which a custom setter"
-                        " or getter. This is not allowed" % (cls,))
+                        " or getter. This is not allowed" % (
+                        cls.__name__,))
 
         def obj_get_property(self, pspec):
             name = pspec.name.replace('-', '_')
@@ -92,7 +93,6 @@
             return
 
         type_register(cls, namespace.get('__gtype_name__'))
-
 _gobject._install_metaclass(GObjectMeta)
 
 del _gobject
diff -urN pygobject-2.14.1.old/tests/test_properties.py pygobject-2.14.1/tests/test_properties.py
--- pygobject-2.14.1.old/tests/test_properties.py	2007-11-05 17:47:52.000000000 +0100
+++ pygobject-2.14.1/tests/test_properties.py	2008-06-02 23:27:26.000000000 +0200
@@ -327,6 +327,41 @@
         b.prop1 = 20
         self.assertEquals(b.prop1, 20)
 
+    def testPropertySubclassCustomSetter(self):
+        # test for #523352
+        class A(GObject):
+            def get_first(self):
+                return 'first'
+            first = gobject.property(type=str, getter=get_first)
+
+        class B(A):
+            def get_second(self):
+                return 'second'
+            second = gobject.property(type=str, getter=get_second)
+
+        a = A()
+        self.assertEquals(a.first, 'first')
+        self.assertRaises(TypeError, setattr, a, 'first', 'foo')
+
+        b = B()
+        self.assertEquals(b.first, 'first')
+        self.assertRaises(TypeError, setattr, b, 'first', 'foo')
+        self.assertEquals(b.second, 'second')
+        self.assertRaises(TypeError, setattr, b, 'second', 'foo')
+
+    def testPropertySubclassCustomSetterError(self):
+        try:
+            class A(GObject):
+                def get_first(self):
+                    return 'first'
+                first = gobject.property(type=str, getter=get_first)
+
+                def do_get_property(self, pspec):
+                    pass
+        except TypeError:
+            pass
+        else:
+            raise AssertionError
 
 if __name__ == '__main__':
     unittest.main()

--===============2093913649==--

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash




Tags added: Request was from Santiago Ruano Rincón <santiago@unicauca.edu.co> to control@bugs.debian.org. (Mon, 02 Jun 2008 22:06:02 GMT) (full text, mbox, link).


Tags added: patch Request was from Santiago Ruano Rincón <santiago@unicauca.edu.co> to control@bugs.debian.org. (Mon, 02 Jun 2008 22:15:02 GMT) (full text, mbox, link).


Blocking bugs of 484024 removed: 484086 Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Thu, 12 Jun 2008 13:00:02 GMT) (full text, mbox, link).


Noted your statement that Bug has been forwarded to http://bugzilla.gnome.org/show_bug.cgi?id=523352. Request was from Josselin Mouette <joss@debian.org> to control@bugs.debian.org. (Sat, 14 Jun 2008 11:48:06 GMT) (full text, mbox, link).


Reply sent to Josselin Mouette <joss@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to rafael@laptop.org:
Bug acknowledged by developer. (full text, mbox, link).


Message #52 received at 484024-done@bugs.debian.org (full text, mbox, reply):

From: Josselin Mouette <joss@debian.org>
To: Santiago Ruano Rincón <santiago@debian.org>, 484024-done@bugs.debian.org
Subject: Re: Bug#484024: patch
Date: Sat, 14 Jun 2008 13:35:34 +0200
[Message part 1 (text/plain, inline)]
Version: 2.14.2-1

Le lundi 02 juin 2008 à 23:46 +0200, Santiago Ruano Rincón a écrit :
> Attached is the patch that solves the problem, taken from:
> 
> https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/234810

The patch has been applied by upstream and is now in unstable.

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 17 Jul 2008 07:29:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 23 19:33:54 2026; Machine Name: berlioz

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.