← Back to team overview

desktop-packages team mailing list archive

[Bug 842235] Re: Gdk.color_parse returns Gdk.Color instead of a tuple after updating python-gobject to 2.90.3-1svn1

 

This was done by
http://git.gnome.org/browse/pygobject/commit/?id=5b1c875269b7979caae97e84919a690a34d92f29

It is indeed an API break compared to the previous pygobject version,
but it actually brings back the API that PyGTK has. Unfortunately this
was unavoidable, as the old API returning a bool and a color object was
unsafe: it caused crashes when the boolean return value was False, as
the returned pointer was invalid.

So this needs to be fixed in checkbox, sorry about that. As there is
already a bug about that, I'm just closing this one.

** Changed in: pygobject (Ubuntu)
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to pygobject in Ubuntu.
https://bugs.launchpad.net/bugs/842235

Title:
  Gdk.color_parse returns Gdk.Color instead of a tuple after updating
  python-gobject to 2.90.3-1svn1

Status in “pygobject” package in Ubuntu:
  Won't Fix

Bug description:
  I installed Oneiric Beta1, and then updated some packages, among them
  python-gobject (which pulled a new package, python-gobject-2). After
  this, System Testing (checkbox-gtk) crashes as described in bug
  839675.

  As indicated in that bug, the problem is caused by an API-breaking
  change in PyGTK:

  https://bugzilla.gnome.org/show_bug.cgi?id=653462

  "
  Change Gdk.color_parse() to not return a tuple, instead just
  return the created color or None if it wasn't possible to parse
  the name into a color.

  This keeps compatibility with PyGTK but breaks the current API.

  "

  So I'm filing this bug to keep track of the fact that the API has
  changed.

  Steps to reproduce:

  1- On an Oneiric b1 system check the version of python-gobject, should be 2.28.6-4.
  2- Launch a Python shell and execute:
   from gi.repository import Gdk
   Gdk.color_parse("#ffffff")
  3- Result should be a tuple, like (True, <Gdk.Color(red=65535, green=65535, blue=65535)>)
  4- update python-gobject by running sudo apt-get install python-gobject. This will bring in python-gobject-2 and versions will be:
  python-gobject 2.90.3-1svn1
  python-gobject-2 2.28.6-6svn1
  5- Again, aunch a Python shell and execute:
   from gi.repository import Gdk
   Gdk.color_parse("#ffffff")
  6- Result is now just a Gdk.color, like: <Gdk.Color(red=65535, green=65535, blue=65535)>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/842235/+subscriptions


References