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 776378 - Cannot use functions which take GObject.EnumClass as arguments
Cannot use functions which take GObject.EnumClass as arguments
Status: RESOLVED OBSOLETE
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-22 07:15 UTC by Simon Feltman
Modified: 2018-01-12 08:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Simon Feltman 2016-12-22 07:15:49 UTC
(see comment for description)
Comment 1 Simon Feltman 2016-12-22 07:16:00 UTC
Cannot use functions which take GObject.EnumClass as arguments

Particularly GObject.enum_get_value_by_nick() is not functioning. Normally GType or GI classes are automatically coerced to GObjectClass instances. In the case of GObject.GEnum, it is directly derived from the builtin Python "int" so this may be problematic.

Example:

    from gi.repository import GObject, Gio
    GObject.enum_get_value_by_nick(Gio.BusType, 'system')

    Traceback (most recent call last):
  • File "enum.py", line 3 in <module>
    GObject.enum_get_value_by_nick(Gio.BusType, 'system')     TypeError: argument enum_class: Expected GObject.EnumClass, but got gi.repository.Gio.type

See also:

* https://bugzilla.gnome.org/show_bug.cgi?id=685218
* https://git.gnome.org/browse/pygobject/commit/?id=778d05c9
Comment 2 Spammer 2016-12-25 12:01:53 UTC
Created attachment 342457 [details]
Java for android
Comment 3 Christoph Reiter (lazka) 2017-12-22 14:26:14 UTC
Closing this temporarily, as the attachment above triggers a bug in the gitlab migration tool: https://gitlab.gnome.org/External/bztogl/issues/16

Once that is done we can recreate the bug on gitlab.
Comment 4 Christoph Reiter (lazka) 2018-01-12 08:30:34 UTC
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/148