OpenPrinting / system-config-printer

Graphical user interface for CUPS administration
GNU General Public License v2.0
170 stars 89 forks source link

Should call gi.require_version() before calling from gi.repository import #43

Closed bigon closed 8 years ago

bigon commented 8 years ago

Hi,

When using s-c-p, I get a lot of warnings of this type:

/usr/share/system-config-printer/system-config-printer.py:31: PyGIWarning: Polkit was imported without specifying a version first. Use gi.require_version('Polkit', '1.0') before import to ensure that the right version gets loaded. from gi.repository import Polkit /usr/share/system-config-printer/system-config-printer.py:35: PyGIWarning: GdkPixbuf was imported without specifying a version first. Use gi.require_version('GdkPixbuf', '2.0') before import to ensure that the right version gets loaded. from gi.repository import GdkPixbuf /usr/share/system-config-printer/system-config-printer.py:37: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '3.0') before import to ensure that the right version gets loaded. from gi.repository import Gdk /usr/share/system-config-printer/system-config-printer.py:38: 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/share/system-config-printer/jobviewer.py:28: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded. from gi.repository import Notify /usr/share/system-config-printer/jobviewer.py:55: 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. from gi.repository import GnomeKeyring

gi.require_version() should be called to set the required version of the Gir files before actually importing them

bigon commented 8 years ago

And it's actually in git already, oups (commit 5b4785782d75e45efde182d1c07d25ddd9c03eb3)

Sorry for the noise

twaugh commented 8 years ago

np