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 703873 - Regression: TypeError when marshaling union members
Regression: TypeError when marshaling union members
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-09 14:07 UTC by Arnaud B.
Modified: 2013-09-16 08:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test code (838 bytes, text/x-python)
2013-07-09 14:07 UTC, Arnaud B.
  Details
Fix union argument regression when marshaling from python (4.40 KB, patch)
2013-09-11 00:30 UTC, Simon Feltman
committed Details | Review

Description Arnaud B. 2013-07-09 14:07:24 UTC
Created attachment 248729 [details]
test code

The new Gtk.SearchBar [1] reguires a function handle_event() to work, but looks like it fails in Python, saying “TypeError: wrong boxed type”.

[1] https://developer.gnome.org/gtk3/3.9/GtkSearchBar.html
Comment 1 Simon Feltman 2013-07-10 14:25:06 UTC
Confirmed. A simple example to aid debugging:

from gi.repository import Gtk, Gdk
searchBar = Gtk.SearchBar()
event = Gdk.EventKey()
searchBar.handle_event(event)
Comment 2 Simon Feltman 2013-09-11 00:22:15 UTC
This is a general regression when marshaling unions similar to bug #707140 and noted in comment bug #707140#c3.
Comment 3 Simon Feltman 2013-09-11 00:30:04 UTC
Created attachment 254635 [details] [review]
Fix union argument regression when marshaling from python

Check for union members when marshaling boxed types from Python.
This is a regression caused by stricter type checking added when
merging code from pygi-argument.c.
Re-add pyg_boxed_check to the same bit of code in addition to
__gtype__ checking to avoid a double regression.
Comment 4 Simon Feltman 2013-09-16 08:21:59 UTC
Attachment 254635 [details] pushed as ef12049 - Fix union argument regression when marshaling from python