Hi Vincent,
Thanks very much for your patch! I can confirm that it fixes the
warnings with gramps -l, and one of the warnings I see in my old build
log. I didn't have the other one.
I still see another warning in the build log:
/tmp/buildd/gramps-4.2.1~dfsg/gramps/gen/constfunc.py:116: PyGIWarning:
Gtk was imported without specifying a version first. Use
gi.require_version('Gtk', '3.0') before import to ensure that the right
version gets loaded.
from gi.repository import Gtk
I also see warnings with gramps -v:
ross@debian-VB-sid:~/Dropbox/Debian$ gramps -v
/usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1554: Warning:
g_object_ref: assertion 'G_IS_OBJECT (object)' failed
initialized, argv = Gtk.init_check(sys.argv)
/usr/lib/python3/dist-packages/gramps/grampsapp.py:173: PyGIWarning: Gtk
was imported without specifying a version first. Use
gi.require_version('Gtk', '3.0') before import to ensure that the right
version gets loaded.
from gi.repository import Gtk
/usr/lib/python3/dist-packages/gramps/grampsapp.py:223: PyGIWarning:
OsmGpsMap was imported without specifying a version first. Use
gi.require_version('OsmGpsMap', '1.0') before import to ensure that the
right version gets loaded.
from gi.repository import OsmGpsMap as osmgpsmap
/usr/lib/python3/dist-packages/gramps/grampsapp.py:238: PyGIWarning:
GExiv2 was imported without specifying a version first. Use
gi.require_version('GExiv2', '0.10') before import to ensure that the
right version gets loaded.
from gi.repository import GExiv2
A quick grep reveals a few other places that may need the fix:
ross@ross-ixtreme-M5120:~/debian/gramps$ grep "from gi.repository" -rH *
debian/patches/gi-import-version.patch: from gi.repository
import OsmGpsMap as osmgpsmap
debian/patches/gi-import-version.patch: from gi.repository
import GExiv2
debian/patches/gi-import-version.patch: from gi.repository import Gtk
debian/patches/gi-import-version.patch: from gi.repository import PangoCairo
debian/patches/gi-import-version.patch: from gi.repository import GLib
gramps/gui/dialog.py:from gi.repository import GObject
gramps/gui/dialog.py:from gi.repository import Gtk
gramps/gui/dialog.py:from gi.repository import GdkPixbuf
gramps/gui/glade.py:from gi.repository import GObject
gramps/gui/glade.py:from gi.repository import Gtk
gramps/gui/plug/report/_textreportdialog.py:from gi.repository import Gtk
gramps/gui/plug/report/_textreportdialog.py:from gi.repository import
GObject
gramps/gui/plug/report/_fileentry.py:from gi.repository import Gtk
gramps/gui/plug/report/_fileentry.py:from gi.repository import GObject
gramps/gui/plug/report/_bookdialog.py:from gi.repository import Gdk
gramps/gui/plug/report/_bookdialog.py:from gi.repository import Gtk
gramps/gui/plug/report/_bookdialog.py:from gi.repository import GObject
gramps/gui/plug/report/_docreportdialog.py:from gi.repository import Gtk
gramps/gui/plug/report/_graphvizreportdialog.py:from gi.repository
import Gtk
gramps/gui/plug/report/_graphvizreportdialog.py:from gi.repository
import GObject
gramps/gui/plug/report/_papermenu.py:from gi.repository import Gtk
gramps/gui/plug/report/_papermenu.py:from gi.repository import GObject
gramps/gui/plug/report/_drawreportdialog.py:from gi.repository import Gtk
gramps/gui/plug/report/_drawreportdialog.py:from gi.repository import
GObject
gramps/gui/plug/report/_stylecombobox.py:from gi.repository import Gtk
gramps/gui/plug/report/_stylecombobox.py:from gi.repository import GObject
gramps/gui/plug/report/_reportdialog.py:from gi.repository import Gtk
gramps/gui/plug/report/_styleeditor.py:from gi.repository import Gtk, Gdk
gramps/gui/plug/_dialogs.py:from gi.repository import Gtk
gramps/gui/plug/export/_exportassistant.py:from gi.repository import Gtk
gramps/gui/plug/export/_exportassistant.py:from gi.repository import Gdk
gramps/gui/plug/export/_exportassistant.py:from gi.repository import
GdkPixbuf
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Pango
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import Gtk
gramps/gui/plug/export/_exportoptions.py:from gi.repository
import GObject
gramps/gui/plug/_guioptions.py:from gi.repository import Gtk
gramps/gui/plug/_guioptions.py:from gi.repository import Gdk
gramps/gui/plug/_guioptions.py:from gi.repository import GObject
gramps/gui/plug/quick/_quickreports.py:from gi.repository import Gtk