After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754403 - Specify gi version for Jedi plugin
Specify gi version for Jedi plugin
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
3.16.x
Other Linux
: Normal minor
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-01 15:04 UTC by Tobias Schönberg
Modified: 2015-09-01 19:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for jedi-plugin of gnome-builder that fixed import warnings (1.10 KB, patch)
2015-09-01 15:39 UTC, Tobias Schönberg
committed Details | Review

Description Tobias Schönberg 2015-09-01 15:04:04 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.
Comment 1 Tobias Schönberg 2015-09-01 15:39:12 UTC
Created attachment 310435 [details] [review]
Patch for jedi-plugin of gnome-builder that fixed import warnings
Comment 2 Christian Hergert 2015-09-01 18:58:06 UTC
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).
Comment 3 Elad Alfassa 2015-09-01 19:02:59 UTC
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.
Comment 4 Tobias Schönberg 2015-09-01 19:08:07 UTC
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.
Comment 5 Christian Hergert 2015-09-01 19:13:31 UTC
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.
Comment 6 Tobias Schönberg 2015-09-01 19:31:50 UTC
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 :)