Sugar Labs

Port from GObject to GLib (1 of 3)

Thousands of PyGIDeprecationWarning occur in shell.log and activity logs when using PyGObject development releases, because of our use of GObject instead of GLib for certain methods. These should be changed. Examples include;

  • GObject.idle_add to GLib.idle_add,
  • GObject.timeout_add to GLib.timeout_add,
  • GObject.source_remove to GLib.source_remove,
  • GObject.PRIORITY_HIGH to GLib.PRIORITY_HIGH,

Also a few other warnings occur within GObject alone;

  • GObject.property is to change to GObject.Property,
  • GObject.PARAM_ is to change to GObject.ParamFlags.,

Also positional arguments with the GObject constructor have been deprecated, we must use keywords instead, reference:

https://wiki.gnome.org/PyGObject/InitializerDeprecations

Issues have not been created, as it is a waste of time to do so. As of 2019-11-23 there are 121 matches for the code pattern "GObject.source_remove" in org:sugarlabs.

Task tags

  • python
  • gobject
  • glib

Students who completed this task

Rishikesh Joshi, srevinsaju

Task type

  • code Code
close

2019