GNOME Bugzilla – Bug 754403
Specify gi version for Jedi plugin
Last modified: 2015-09-01 19:31:50 UTC
The current build of Gnome-Builder reports 9 warnings when using Jedi code insight. They are all similar. The first 3 are: /home/tobias/jhbuild/install/lib/gnome-builder/plugins/jedi_plugin.py:28: 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 /home/tobias/jhbuild/install/lib/gnome-builder/plugins/jedi_plugin.py:29: PyGIWarning: GtkSource was imported without specifying a version first. Use gi.require_version('GtkSource', '3.0') before import to ensure that the right version gets loaded. from gi.repository import GtkSource /home/tobias/jhbuild/install/lib/gnome-builder/plugins/jedi_plugin.py:30: PyGIWarning: Ide was imported without specifying a version first. Use gi.require_version('Ide', '1.0') before import to ensure that the right version gets loaded. from gi.repository import Ide The solution is pretty simple. I will try to attach a patch to this bug report.
Created attachment 310435 [details] [review] Patch for jedi-plugin of gnome-builder that fixed import warnings
Elad, mind chiming in on this one? It seems strange that you are seeing those warnings. I, at least, don't remember seeing them here (on Fedora 22).
Right. I see those warnings too, but only sometimes, and I'm not sure why they sometimes appear and sometimes don't. I think it makes sense to specify versions, if only to silence these warnings. From a quick look at this patch it looks okay, I didn't actually test that it works - I'm short on time tonight.
I see these warnings in JHBuild, and also in Fedora 23 Alpha. It is some newer version of the python-gi package that is included in F23.
Yeah, I just didn't remember seeing them, didn't say they weren't happening :) Happy to put this in. Just want to make sure we do the right thing on future modules.
Mostly I just wanted to try sending a patch to a small thing I knew how to solve. Mostly hope I am not wasting anybodies time with something unimportant :)