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 682355 - Cannot pass GParamSpec arguments
Cannot pass GParamSpec arguments
Status: RESOLVED OBSOLETE
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
: 690463 (view as bug list)
Depends on: 685275
Blocks:
 
 
Reported: 2012-08-21 13:33 UTC by Mathieu Duponchelle
Modified: 2018-01-10 20:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This applies to pygobject (538 bytes, patch)
2012-08-21 13:34 UTC, Mathieu Duponchelle
none Details | Review
This applies to gobject-introspection (1.00 KB, patch)
2012-08-21 13:35 UTC, Mathieu Duponchelle
none Details | Review
This applies to gobject-introspection (998 bytes, patch)
2012-08-21 13:41 UTC, Mathieu Duponchelle
reviewed Details | Review

Description Mathieu Duponchelle 2012-08-21 13:33:58 UTC
The problem looks like a namespace bug, with the following traceback :

TypeError: argument pspec: Expected GObject.ParamSpec, but got gobject.GParamSpec

It also occurs with the hand written bindings for g_object_class_list_properties, which led me to think pyg_param_spec.c didn't register the types correctly. Unfortunately, I couldn't find the exact reason why.

Attached is a testcase.
Comment 1 Mathieu Duponchelle 2012-08-21 13:34:39 UTC
Created attachment 221996 [details] [review]
This applies to pygobject
Comment 2 Mathieu Duponchelle 2012-08-21 13:35:28 UTC
Created attachment 221997 [details] [review]
This applies to gobject-introspection
Comment 3 Mathieu Duponchelle 2012-08-21 13:41:04 UTC
Created attachment 221999 [details] [review]
This applies to gobject-introspection
Comment 4 Johan (not receiving bugmail) Dahlin 2012-08-21 13:55:05 UTC
The static bindings of GParamSpec (in the gobject module) should probably be removed in favor of the introspected ones in gi/GObject.
Comment 5 Mathieu Duponchelle 2012-08-21 14:03:30 UTC
Thanks for the tip, I'll have a try soon
Comment 6 Martin Pitt 2012-09-03 10:12:38 UTC
Note, in bug 683099 I attached a test case which checks a full round-trip from Python through C back to Python via a signal argument. This currently fails bitterly due to multiple bugs.

Note that before we can drop the static bindings for GParamSpec, the GObject.param_spec_* methods must be fixed to become introspectable (they currently are not). We also need to provide overrides for providing a backwards compatible API: the GObject.ParamSpec API e. g. uses .get_name(), where our _gobject.ParamSpec uses .name.
Comment 7 Johan (not receiving bugmail) Dahlin 2012-10-02 10:57:58 UTC
This will be resolved by 685275 but let's keep this bug open until that's done.
Comment 8 Simon Feltman 2012-12-19 02:23:40 UTC
*** Bug 690463 has been marked as a duplicate of this bug. ***
Comment 9 Martin Pitt 2013-01-14 11:36:11 UTC
Comment on attachment 221999 [details] [review]
This applies to gobject-introspection

This g-i patch has been superseded by a more complete one, which actually asserts some properties of the GParamSpec argument:

http://git.gnome.org/browse/gobject-introspection/commit/?id=5e4ddbcb8eacede04d5ade9e630d2efe29c022a0
Comment 10 Martin Pitt 2013-01-14 11:38:27 UTC
Comment on attachment 221996 [details] [review]
This applies to pygobject

This has been superseded by a more complete test:

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

Thanks!
Comment 11 Martin Pitt 2013-01-14 11:54:39 UTC
The C -> Python direction has already worked fine for some time (these are covered by tests), so retitling the bug accordingly.
Comment 12 GNOME Infrastructure Team 2018-01-10 20:18:54 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/30.