[Python-modules-team] Bug#801242: python-keyring: shows warning about missing gi.require_version
Daniel Serpell
daniel.serpell at aplik.cl
Wed Oct 7 18:42:47 UTC 2015
Package: python-keyring
Version: 5.4-2
Severity: normal
Tags: patch
Dear Maintainer,
Anytime the Gnome.py module is loaded, the following warning is
displayed:
/usr/lib/python2.7/dist-packages/keyring/backends/Gnome.py:6:
PyGIWarning: GnomeKeyring was imported without specifying a version
first. Use gi.require_version('GnomeKeyring', '1.0') before import to
ensure that the right version gets loaded.
The following patch removes the warning:
-----------------------------------------------------------------------
diff -ur keyring/backends/Gnome.py keyring/backends/Gnome.py
--- keyring/backends/Gnome.py 2015-06-22 12:12:17.000000000 -0300
+++ keyring/backends/Gnome.py 2015-10-07 15:36:42.347502555 -0300
@@ -3,6 +3,8 @@
try:
from gi import Repository
if Repository.get_default().enumerate_versions('GnomeKeyring'):
+ import gi.require_version
+ gi.require_version('GnomeKeyring', '1.0')
from gi.repository import GnomeKeyring
except ImportError:
pass
-----------------------------------------------------------------------
Thanks,
Daniel.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (500, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python-keyring depends on:
pn python:any <none>
Versions of packages python-keyring recommends:
ii python-crypto 2.6.1-5+b3
ii python-secretstorage 2.1.2-2
Versions of packages python-keyring suggests:
ii gir1.2-gnomekeyring-1.0 3.12.0-1+b1
pn python-fs <none>
pn python-gdata <none>
ii python-gi 3.18.0-1
pn python-kde4 <none>
pn python-keyczar <none>
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-gi-require_version.patch
Type: text/x-diff
Size: 480 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20151007/b79ed34e/attachment.patch>
More information about the Python-modules-team
mailing list