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 784307 - Cannot handle allowed type range class range
Cannot handle allowed type range class range
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: gio
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-28 19:48 UTC by Alex Stewart
Modified: 2018-04-17 11:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alex Stewart 2017-06-28 19:48:31 UTC
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..?
Comment 1 GNOME Infrastructure Team 2018-01-10 20:58:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pygobject/issues/134.
Comment 2 Christoph Reiter (lazka) 2018-04-17 11:08:33 UTC
Fixed in master: https://gitlab.gnome.org/GNOME/pygobject/commit/ca20535e993