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 684058 - Introspection is ignored for properties defined in parent classes if the child isn't introspected
Introspection is ignored for properties defined in parent classes if the chil...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: GNOME 3.6
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-15 01:38 UTC by Olivier Crête
Modified: 2012-09-24 07:51 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
pygi-property: Lookup property in base classes of non-introspected types (2.16 KB, patch)
2012-09-15 01:38 UTC, Olivier Crête
accepted-commit_after_freeze Details | Review
test_properties: Test property that requires introspection to be used (1.64 KB, patch)
2012-09-17 17:05 UTC, Olivier Crête
none Details | Review
pygi-property: Lookup property in base classes of non-introspected types (3.02 KB, patch)
2012-09-18 06:53 UTC, Martin Pitt
committed Details | Review

Description Olivier Crête 2012-09-15 01:38:57 UTC
Created attachment 224376 [details] [review]
pygi-property: Lookup property in base classes of  non-introspected types

If in a base class I define some property as a "GLib.List(MyType)" and I subclass it in a plugin. Then the pygobject will fail to find the data because it ignore parent classes if the plugin isn't introspected.

Attached is a patch that will just go up the tree of GTypes even if the child isn't introspected.
Comment 1 Martin Pitt 2012-09-17 07:19:47 UTC
Thanks for this! Do you have a (preferably really small) reproducer for this, which we can develop a test case from?
Comment 2 Martin Pitt 2012-09-17 07:43:49 UTC
We already have some tests which check accessing the parent class' properties that are defined from Python:

  http://git.gnome.org/browse/pygobject/tree/tests/test_properties.py#n599

I now added a test case which checks the parent class properties which are defined in C:

  http://git.gnome.org/browse/pygobject/commit/?id=a047f61

but that already works fine. So I'll wait for your reproducer. Thanks!
Comment 3 Olivier Crête 2012-09-17 17:05:42 UTC
Created attachment 224531 [details] [review]
test_properties: Test property that requires introspection to be used
Comment 4 Martin Pitt 2012-09-18 06:44:11 UTC
Comment on attachment 224376 [details] [review]
pygi-property: Lookup property in base classes of  non-introspected types

Ah, thanks! I'll reshuffle the second patch so that it becomes a new test case instead of changing an existing one (I think the existing one is still good to have). We are in hard code freeze ATM, this will go into master and 3.4.1 after the GNOME 3.6 release.
Comment 5 Martin Pitt 2012-09-18 06:53:49 UTC
Created attachment 224576 [details] [review]
pygi-property: Lookup property in base classes of non-introspected types

This provides a separate test case in test_everything.py (which exercises Regress) and joins the patch and test case. Thanks!
Comment 6 Martin Pitt 2012-09-24 07:51:50 UTC
Comment on attachment 224576 [details] [review]
pygi-property: Lookup property in base classes of non-introspected types

Committed. Fix will be in 3.4.1.