[totem/gnome-3-18] opensubtitles: Fix GI deprecation warnings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/gnome-3-18] opensubtitles: Fix GI deprecation warnings
- Date: Tue, 3 Nov 2015 14:39:36 +0000 (UTC)
commit b502b76eb28828cf7a44e504c3fcf07fa82c30d6
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 3 15:36:03 2015 +0100
opensubtitles: Fix GI deprecation warnings
/usr/lib64/totem/plugins/opensubtitles/opensubtitles.py:4: PyGIWarning: Peas was imported without
specifying a version first. Use gi.require_version('Peas', '1.0') before import to ensure that the right
version gets loaded.
from gi.repository import Peas, Gtk, Gdk # pylint: disable-msg=E0611
/usr/lib64/totem/plugins/opensubtitles/opensubtitles.py:4: 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 Peas, Gtk, Gdk # pylint: disable-msg=E0611
/usr/lib64/totem/plugins/opensubtitles/opensubtitles.py:5: PyGIWarning: Totem was imported without
specifying a version first. Use gi.require_version('Totem', '1.0') before import to ensure that the right
version gets loaded.
from gi.repository import Gio, Pango, Totem # pylint: disable-msg=E0611
https://bugzilla.gnome.org/show_bug.cgi?id=757526
src/plugins/opensubtitles/opensubtitles.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/opensubtitles/opensubtitles.py b/src/plugins/opensubtitles/opensubtitles.py
index e58636b..f2c39e3 100644
--- a/src/plugins/opensubtitles/opensubtitles.py
+++ b/src/plugins/opensubtitles/opensubtitles.py
@@ -1,5 +1,9 @@
# -*- coding: utf-8 -*-
+import gi
+gi.require_version('Peas', '1.0')
+gi.require_version('Gtk', '3.0')
+gi.require_version('Totem', '1.0')
from gi.repository import GLib, GObject # pylint: disable-msg=E0611
from gi.repository import Peas, Gtk, Gdk # pylint: disable-msg=E0611
from gi.repository import Gio, Pango, Totem # pylint: disable-msg=E0611
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]