Gio.Settings: Cannot handle allowed type range class range
Submitted by Alex Stewart
Link to original bug (#784307)
Description
The __setitem__
binding for gsettings objects apparently doesn't support setting any keys which have range restrictions. This dramatically reduces their usefulness in a lot of situations.
An example I just personally ran into:
>>> Gio.Settings.new('org.gnome.system.proxy.http')['port'] = 8080
Traceback (most recent call last):
File "`<stdin>`", line 1, in `<module>`
File "/usr/lib/python3/dist-packages/gi/overrides/Gio.py", line 112, in __setitem__
raise NotImplementedError('Cannot handle allowed type range class ' + str(type_))
NotImplementedError: Cannot handle allowed type range class range
Poking around a bit, I discovered that Bug 746724 (which is not specifically for this issue but is related) has an offered patch which I believe would solve this problem, if it were merged in, but that ticket appears to have been in the "New" state for over two years now with nobody even looking at it..?
Edited by Christoph Reiter