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 749625 - TypeError: argument allocation: Expected Gdk.Rectangle, but got gi.repository.cairo.RectangleInt
TypeError: argument allocation: Expected Gdk.Rectangle, but got gi.repository...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal major
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-20 11:22 UTC by Christoph Reiter (lazka)
Modified: 2015-05-31 14:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.42 KB, patch)
2015-05-30 15:53 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Christoph Reiter (lazka) 2015-05-20 11:22:09 UTC
The following errors out on jhbuild trunk (gtk+, glib, gobject-introspection, pygobject)

from gi.repository import Gtk
class A(Gtk.Window):
    def do_size_allocate(self, *args):
        return Gtk.Window.do_size_allocate(self, *args)
A().show()

TypeError: argument allocation: Expected Gdk.Rectangle, but got gi.repository.cairo.RectangleInt

ebassi pointed to some recent bug reports/changes and his suggested change fixes the above but I haven't looked into it any further.

<ebassi> https://bugzilla.gnome.org/show_bug.cgi?id=748832
<ebassi> And: https://bugzilla.gnome.org/show_bug.cgi?id=748833
<ebassi> pygobject does some overriding of its own on GdkRectangle as well
<ebassi> The original issue: https://bugzilla.gnome.org/show_bug.cgi?id=723394
<ebassi> lazka: I think pygobject should remove this:
<ebassi>     from gi.repository import cairo as _cairo
<ebassi>     Rectangle = _cairo.RectangleInt
<ebassi> From the Gdk.py override
Comment 1 Christoph Reiter (lazka) 2015-05-30 15:53:31 UTC
Created attachment 304313 [details] [review]
patch

Fix attached.
Comment 2 Simon Feltman 2015-05-30 17:11:37 UTC
Review of attachment 304313 [details] [review]:

LGTM, thanks!