GNOME Bugzilla – Bug 540741
Need to make pygobject GOption types public for gnome-python
Last modified: 2009-04-18 21:11:41 UTC
+++ This bug was initially created as a clone of Bug #507174 +++ see GNOME Goal #1 at http://live.gnome.org/GnomeGoals/PoptGOption . gnome-python seems to be one of the very last modules still using popt, it would be great to have some efforts to finally get rid of popt for GNOME 2.22. (also see bug 136953 for some historical reference of popt in gnome-python.)
Please see 'gtk.override' in PyGTK trunk: import gio.File as PyGFile_Type for GFile This imports a GIO type at runtime and only if GFile is defined (i.e. GLib is new enough), without having to expose it in '.h' files. Can you use the same technique for gnome-python?
*ping* - this blocks bug 507174.
Please read comment #1. Can you use the same technique?
(In reply to comment #1) > Please see 'gtk.override' in PyGTK trunk: > > import gio.File as PyGFile_Type for GFile > > This imports a GIO type at runtime and only if GFile is defined (i.e. GLib is > new enough), without having to expose it in '.h' files. Can you use the same > technique for gnome-python? > I am not who wrote the gnome-python patch, but I don't think so. Gtk can get away by treating GFile as a GObject, and getting the GFile from a PyGObject is easy (pyobj->obj). However GOptionGroup and GOptionContext are not GObjects, and so there really isn't any generic base we can fall back to.
As I see from changelog this was fixed on April 5.