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 722104 - regression: "TypeError: expected tuple for callback user_data" for a "None" userdata
regression: "TypeError: expected tuple for callback user_data" for a "None" u...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-13 13:21 UTC by Martin Pitt
Modified: 2014-01-14 07:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
reproducer (637 bytes, text/x-python)
2014-01-13 13:21 UTC, Martin Pitt
Details

Description Martin Pitt 2014-01-13 13:21:42 UTC
Created attachment 266161 [details]
reproducer

Attached test script works with PyGObject 3.10, but with 3.11 it fails with

  TypeError: expected tuple for callback user_data

when clicking on the "actionlabel" button.

This was apparently introduced in commit 9456e83 (Add support for variable user data arguments).

This might be special with the Notify API, but I don't see any weirdness with it at first sight.

A quick workaround is to pass (None, ) as user_data argument instead of None.
Comment 1 Simon Feltman 2014-01-14 01:02:39 UTC
Fixed with:
https://git.gnome.org/browse/pygobject/commit/?id=44d0037

Leaving open because we need a regression test for this. Also note that
Notify.Notification.add_action will leak closure data because the 
GDestroyNotify argument is not annotated properly (should be implicit).
Comment 2 Martin Pitt 2014-01-14 07:55:31 UTC
Thanks Simon!

I committed https://git.gnome.org/browse/gobject-introspection/commit/?id=9c2a45a to get some test API for that, and committed test cases for None, single value, and tuple user_data arguments: https://git.gnome.org/browse/pygobject/commit/?id=a50a838 . These fail with this error without your fix, and now all succeed.