Bug#802010: gramps: PyGIWarning for OsmGpsMap and GExiv2

2015-12-06 Thread Ross Gammon
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

Bug#802010: gramps: PyGIWarning for OsmGpsMap and GExiv2

2015-11-23 Thread Vincent Smeets
Control: tags 802010 + patch

Hallo,

I have checked this bug and created a patch for it. I have attached it to
this mail. You can use it as a quilt patch in the directory debian/patches.

I have fixed 4 files (2 as reported by this bug and 2 as reported in the
build log). I have used the versions as they were suggested by my
Debian(Testing) system.
I know that there is upstream a fix too, but that fixes not all my files.
They also reported that the fix will be used in version 5 of gramps. My
patch can be used directly for this version 4 of gramps and you can remove
it as soon as gramps-5 is released.

Regards,
Vincent Smeets


Bug-802010
Description: Binary data


Bug#802010: gramps: PyGIWarning for OsmGpsMap and GExiv2

2015-10-16 Thread Vincent Smeets
Package: gramps
Version: 4.2.0~dfsg-1
Severity: minor

When I call gramps, it will show two PyGIWarnings. See my output below.
I think it's only a minor problem and doesn't do much harm, but warnings
show potential problems.
Can you check and fix these warnings?

Thanks,
Vincent


vincent@PC-Vincent:~$ gramps -l
:47: 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.
:387: 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.
List of known Family Trees in your database path

/home/vincent/.gramps/grampsdb/544be60b with name "Smeets"
vincent@PC-Vincent:~$ 


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gramps depends on:
ii  gir1.2-gtk-3.03.16.6-1
ii  librsvg2-22.40.11-1
ii  python3   3.4.3-6
ii  python3-bsddb36.1.0-1+b1
ii  python3-gi3.18.0-1
ii  python3-gi-cairo  3.18.0-1
pn  python3:any   
ii  xdg-utils 1.1.1-1

Versions of packages gramps recommends:
ii  gir1.2-gexiv2-0.100.10.3-1+b1
ii  gir1.2-osmgpsmap-1.0  1.0.2-3
ii  graphviz  2.38.0-10
ii  python3-icu   1.9.2-2+b1

Versions of packages gramps suggests:
ii  fonts-freefont-ttf20120503-4
pn  gir1.2-goocanvas-2.0  
pn  gir1.2-gtkspell3-3.0  
pn  python3-pil   
pn  rcs   

-- no debconf information