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 639934 - Override for Gtk.Adjustment does not work if any parameters are omitted.
Override for Gtk.Adjustment does not work if any parameters are omitted.
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-19 11:11 UTC by Laszlo Pandy
Modified: 2011-01-20 10:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[GI] Modify override for Gtk.Adjustment to allow position or keyword arguments in __init__(). (3.98 KB, patch)
2011-01-19 11:11 UTC, Laszlo Pandy
accepted-commit_now Details | Review

Description Laszlo Pandy 2011-01-19 11:11:13 UTC
Gtk.Adjustment() (no arguments sent to constructor) fails with error:
TypeError: could not convert value for property `upper'

If any of the six parameters are omitted, the default value of None is used by the override. However this fails, because GObject.__init__() cannot set None for an integer property.
Comment 1 Laszlo Pandy 2011-01-19 11:11:15 UTC
Created attachment 178704 [details] [review]
[GI] Modify override for Gtk.Adjustment to allow position or keyword arguments in __init__().

Previously passing no arguments was not working, because the default value for each parameter was None, and GObject.__init__() refuses to allow None for integer properties. This patch does not pass None up to GObject.__init__. Instead it does not pass the parameter at all, and uses the class's default values.