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 687492 - GObject.signal_list_ids raises SystemError
GObject.signal_list_ids raises SystemError
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-03 05:10 UTC by Simon Feltman
Modified: 2012-11-06 04:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Feltman 2012-11-03 05:10:32 UTC
The following was found when writing tests for: bug 687487

>>> from gi.repository import GObject
>>> GObject.signal_list_ids(GObject.TYPE_INVALID)
SystemError: error return without exception set

This should probably raise a ValueError instead but will most likely behave differently with the introspection binding.
Comment 1 Simon Feltman 2012-11-03 05:16:27 UTC
Also happens with:

GObject.signal_lookup('NOT_A_SIGNAL_NAME', GObject.TYPE_INVALID)
Comment 2 Johan (not receiving bugmail) Dahlin 2012-11-03 11:23:41 UTC
What does the old static bindings do?  Should possibly mimic that behavior, unless it's really wrong.
Comment 3 Simon Feltman 2012-11-04 04:25:33 UTC
(In reply to comment #2)
> What does the old static bindings do?  Should possibly mimic that behavior,
> unless it's really wrong.

This error is from the static bindings. I'm guessing the python wrapper functions are returning NULL without setting a py error, so python gives its own SystemError.

This is a bug in the static bindings in regards to how they are handling the error condition. We could emulate the bug with the gi/overrides version if possible, but I think it should eventually be fixed and give a better exception/error message. The gi bindings at least raise a type error but the message text is somewhat confusing:
 TypeError: Must be gobject.GType, not gobject.GType
Comment 4 Simon Feltman 2012-11-06 04:17:17 UTC
This was fixed along with bug 687487