Opened 8 years ago

Last modified 8 years ago

#4965 new defect

GdkX11 import should be versioned

Reported by: davelab6 Owned by:
Priority: High Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Major Keywords: patch
Cc: Distribution/OS:
Bug Status: New

Description

When I run the current edit-fonts-activity code in a VM of Fedora-Live-SoaS-x86_64-23-10.iso, I see this error:

/usr/lib/python2.7/site-packages/sugar3/graphics/window.py:26: PyGIWarning: GdkX11 was imported without specifying a version first. Use gi.require_version('GdkX11', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import GdkX11

A similar issue was fixed in https://github.com/sugarlabs/sugar-toolkit-gtk3/commit/aea65408f06ec930696b14bc9c2c452ceaaf6853 but it looks like this one has not been fixed, because the plain import

  from gi.repository import GdkX11

occurs a lot:

https://github.com/search?utf8=%E2%9C%93&q=org%3Asugarlabs+++from+gi.repository+import+GdkX11&type=Code&ref=searchresults

but the versioned one,

gi.require_version('GdkX11', '3.0')

does not occur anywhere.

https://github.com/search?utf8=✓&q=org%3Asugarlabs+++gi.require_version%28%27GdkX11%27%2C+%273.0%27%29&type=Code&ref=searchresults

Change History (1)

Note: See TracTickets for help on using tickets.