GNOME Bugzilla – Bug 722104
regression: "TypeError: expected tuple for callback user_data" for a "None" userdata
Last modified: 2014-01-14 07:55:31 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.
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).
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.