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 700092 - regression, inherit do_ methods from Gtk.TreeModel not working
regression, inherit do_ methods from Gtk.TreeModel not working
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-10 16:16 UTC by Benny Malengier
Modified: 2013-05-13 06:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix vfunc info search for classes with multiple inheritance (2.21 KB, patch)
2013-05-13 02:33 UTC, Simon Feltman
none Details | Review
Fix vfunc info search for classes with multiple inheritance (2.23 KB, patch)
2013-05-13 05:35 UTC, Simon Feltman
committed Details | Review

Description Benny Malengier 2013-05-10 16:16:11 UTC
Our application breaks when moving from 3.4 to 3.8

old: Ubuntu 12.10
 gtk++     : 3.6.0
 pygobject : 3.4.0

new: stock Ubuntu 13.04
 gtk++     : 3.6.4
 pygobject : 3.8.0

Specifically, we could do multiple inheritance of method
do_get_n_columns
in class inheriting from
class TreeBaseModel(GObject.GObject, Gtk.TreeModel)

This no longer works, the method bound is always the topmost do_get_n_columns.

Is this intended behavior? 

Workaround: like generictreemodel in pygtkcompat: 

     def do_get_n_columns(self):
        """Internal method. Don't inherit"""
        return self.on_get_n_columns()

in topmost class, then inherit on_get_n_columns as usual
Comment 1 Simon Feltman 2013-05-12 05:17:16 UTC
Confirmed. Added expectantly failing test:
https://git.gnome.org/browse/pygobject/commit/?id=065503d5e284d

This still need to be be bisected.
Comment 3 Simon Feltman 2013-05-13 02:33:36 UTC
Created attachment 243958 [details] [review]
Fix vfunc info search for classes with multiple inheritance

Ensure the search for vfunc info continues recursively even if the
current class being looked does not contain an InterfaceInfo. This
more exhaustive search is needed for setups with multiple sub-classes
and multiple inheritance.

This should also be pushed to 3.8.
Comment 4 Simon Feltman 2013-05-13 05:35:16 UTC
Created attachment 243965 [details] [review]
Fix vfunc info search for classes with multiple inheritance

Ensure the search for vfunc GI info continues recursively even if the
current class being looked at does not contain GI info of type
InterfaceInfo. This more exhaustive search is needed for setups with
multiple sub-classes and multiple inheritance.

(updated commit message)
Comment 5 Martin Pitt 2013-05-13 06:06:43 UTC
Comment on attachment 243965 [details] [review]
Fix vfunc info search for classes with multiple inheritance

Thanks for fixing this! Please also push to 3.8.
Comment 6 Simon Feltman 2013-05-13 06:11:29 UTC
Attachment 243965 [details] pushed as bef5939 - Fix vfunc info search for classes with multiple inheritance
Comment 7 Simon Feltman 2013-05-13 06:16:54 UTC
Pushed to master and the 3.8 branch.