gedit in -proposed breaks snippets plugin

Bug #877397 reported by Marc Deslauriers
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygobject
Fix Released
Medium
pygobject (Ubuntu)
Fix Released
High
Martin Pitt
Oneiric
Fix Released
Undecided
Unassigned

Bug Description

gedit in oneiric-proposed breaks the snippets plugin:

Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/snippets/__init__.py", line 19, in <module>
    from windowactivatable import WindowActivatable
  File "/usr/lib/gedit/plugins/snippets/windowactivatable.py", line 29, in <module>
    class Activate(Gedit.Message):
  File "/usr/lib/gedit/plugins/snippets/windowactivatable.py", line 31, in Activate
    iter = GObject.property(type=Gtk.TextIter)
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 111, in __init__
    self.type = self._type_from_python(type)
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 202, in _type_from_python
    raise TypeError("Unsupported type: %r" % (type_,))
TypeError: Unsupported type: <class 'gi.overrides.Gtk.TextIter'>

(gedit:3353): libpeas-WARNING **: Error loading plugin 'snippets'

Reverting to gedit 3.2.0-0ubuntu1 resolves the issue.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit 3.2.1-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Tue Oct 18 08:48:41 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110302)
SourcePackage: gedit
UpgradeStatus: Upgraded to oneiric on 2011-08-16 (63 days ago)

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
tags: added: regression-proposed
Changed in gedit (Ubuntu Oneiric):
assignee: nobody → Didier Roche (didrocks)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Some additional info:
foo = Gtk.TextIter()
works

bar = GObject.property(type=Gtk.TextIter)
trigger the above exception, is it supposed to work on pygi word, or is the snippet wrong?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

GObject.property(type=Gtk.Box) works FYI

Changed in gedit (Ubuntu Oneiric):
assignee: Didier Roche (didrocks) → nobody
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :
Martin Pitt (pitti)
affects: gedit (Ubuntu) → pygobject (Ubuntu)
Changed in pygobject (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Triaged
Changed in pygobject (Ubuntu Oneiric):
status: New → Triaged
Revision history for this message
Martin Pitt (pitti) wrote :

Confirmed that it's fixed upstream. Test case:

$ python -c 'from gi.repository import GObject, Gtk; print GObject.property(type=Gtk.TextIter)'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 111, in __init__
    self.type = self._type_from_python(type)
  File "/usr/lib/python2.7/dist-packages/gi/_gobject/propertyhelper.py", line 202, in _type_from_python
    raise TypeError("Unsupported type: %r" % (type_,))
TypeError: Unsupported type: <class 'gi.overrides.Gtk.TextIter'>

$ jhbuild run python -c 'from gi.repository import GObject, Gtk; print GObject.property(type=Gtk.TextIter)'
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
<gobject property (uninitialized) (GtkTextIter)>

Comment 4 points to the actual fix, we should also get http://git.gnome.org/browse/pygobject/commit/?id=bef8d385 for the corresponding test case.

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

Uploaded to oneiric-proposed queue.

Changed in pygobject (Ubuntu):
importance: Undecided → High
status: Triaged → Fix Committed
Changed in pygobject (Ubuntu Oneiric):
status: Triaged → Fix Committed
Changed in pygobject:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Marc, or anyone else affected,

Accepted pygobject into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I just testing the update in -proposed, and it fixes the issue with gedit in -proposed.
Marking verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.2-1

---------------
pygobject (3.0.2-1) experimental; urgency=low

  * New upstream release:
    - Allow GBoxed types as property. (LP: #877397)
    - When converting an object with transfer none, make sure the wrapper owns
      a ref. (LP: #874299)
    - Gdk overrides: Unbreak for Gdk-2.0. (LP: #875399)
    - Do union member checks for unions that are parameters.
    - Fix "Returns: (skip)" method calls without (out) arguments.
 -- Martin Pitt <email address hidden> Sun, 23 Oct 2011 12:54:30 +0200

Changed in pygobject (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pygobject - 3.0.0-0ubuntu3

---------------
pygobject (3.0.0-0ubuntu3) oneiric-proposed; urgency=low

  * Add 00git_allow_gboxed_properties.patch: Add the GBoxed type as valid type
    to the gobject property helper. This fixes the "snippets" gedit plugin.
    Patch taken from upstream git head. (LP: #877397)
  * Add 00git_gboxed_property_test.patch: Corresponding test case. Taken from
    upstream git head.
  * Add 00git_gdk2_overrides_atom_intern.patch: Fix Gdk override to also work
    for Gdk 2.0. Patch also pushed to upstream git. (LP: #875399)
 -- Martin Pitt <email address hidden> Wed, 19 Oct 2011 09:05:09 +0200

Changed in pygobject (Ubuntu Oneiric):
status: Fix Committed → Fix Released
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.