GNOME Bugzilla – Bug 677960
Add Gee/Vala generics to PyGObject
Last modified: 2015-02-07 17:00:29 UTC
PyGObject support GLib.List<G> and GLib.Hash<K,V>, but what about Vala/Gee generics? How can I create a GLib.List<string> in Python and how can I do the same for Vala/Gee generics? May be defining a C API that defines functions that can handle generics and Python could define the type to use. Gee's GIR defines lot of interfaces and most of them are Generics. Particulary when I use: >> from gi.repository import Gee works correctly but when try to use the interfaces or just to check it exists as type I wrote: >> Gee.List I get the following error: Traceback (most recent call last):
+ Trace 230356
return getattr(self._introspection_module, name)
wrapper = metaclass(name, bases, dict_)
register_interface_info(cls.__info__.get_g_type())
By inspecting Gee's tree I found that most classes implement and interfaces have as prerequisite Gee.Traversable, but it is not defined: >> Gee.Traversable Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/gi/module.py", line 243, in __getattr__ return getattr(self._introspection_module, name) File "/usr/lib/python2.7/dist-packages/gi/module.py", line 105, in __getattr__ self.__name__, name)) AttributeError: 'gi.repository.Gee' object has no attribute 'Traversable'
Duplicate of bug #639908?
*** This bug has been marked as a duplicate of bug 639908 ***
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]