Tuesday, May 3, 2011

Time to port your Python application to GObject introspection?

From time to time I realize that not all maintainers of GNOME applications written in Python have been following what has been happening upstream during the GNOME 3 development cycle.

Some of the noise we have been making about introspection and hackfests may have reached them, but for someone who has only time to review patches and make releases, this new stuff may have seemed as of secondary relevance.

For those that are asking themselves whether they should invest time now into moving away from PyGtk and the other static bindings, I would summarize the decision as to whether you want your application to run on Gtk+ 3 (and other recent APIs in GNOME 3) or not.

Besides that, there are other advantages such as reduced memory usage, fast startup and being able to use libraries that have no static bindings.

About distribution, most major distros have already packaged the whole of GNOME 3 and the rest will follow in the following months. As a rule of thumb, if you can develop for GNOME 3 in C in a particular distro version, you have already all you need to port your app to introspection.

As always, I want to remember that PyGObject (and gobject-introspection for that matter) has no dedicated developers. If it's progressing forward is because some application authors decided to jump and lend a hand, so if you are producing code that uses GNOME and Python, please consider dedicating some time to file bugs, write test cases and maybe writing a patch yourself.