Enumerations do not get filled in when accessing from property types
I am not sure if the issue is with Gegl , Gobject Introspection or the glue in between
This works (Note that the enums get listed properly):
$ python3
Python 3.6.1 (default, Mar 26 2017, 22:44:49)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gegl
>>> Gegl.init()
[]
>>> dir(Gegl.DitherMethod)
['ADD', 'ADD_COVARIANT', 'BAYER', 'FLOYD_STEINBERG', 'NONE', 'RANDOM', 'RANDOM_COVARIANT', 'XOR', 'XOR_COVARIANT', '__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dict__', '__dir__', '__divmod__', '__doc__', '__enum_values__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__gtype__', '__hash__', '__index__', '__info__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__module__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes', 'value_name', 'value_nick']
This doesn't (Note that the enum is not listed and the effect is permanent.)
$ python3
Python 3.6.1 (default, Mar 26 2017, 22:44:49)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gegl
>>> Gegl.init()
[]
>>> props = Gegl.Operation.list_properties('gegl:dither')
>>> prop = props2[4]
>>> prop
<GeglParamEnum 'dither-method'>
>>> dir(prop)
['__doc__', '__gtype__', 'blurb', 'default_value', 'enum_class', 'flags', 'name', 'nick', 'owner_type', 'value_type']
>>> prop.enum_class
<class '__main__.GeglDitherMethod'>
>>> #### ------------------ Note what happens here: The enums are not listed ---------------
>>> dir(prop.enum_class)
['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dict__', '__dir__', '__divmod__', '__doc__', '__enum_values__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__gtype__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__module__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes', 'value_name', 'value_nick']
>>> #### ---------------- Note that this permanently affects Gegl.DitherMethod ------------------
...
>>> dir(Gegl.DitherMethod)
['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dict__', '__dir__', '__divmod__', '__doc__', '__enum_values__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__gt__', '__gtype__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__module__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes', 'value_name', 'value_nick']
Edited by Kamath Laxminarayana