[OE-core] [PATCH 3/3] lib/oeqa/runtime/cases/gi.py: fix deprecation warning

Alexander Kanavin alex.kanavin at gmail.com
Fri Feb 1 12:58:54 UTC 2019


With newest Python, the following is printed:

PyGIDeprecationWarning: GObject.markup_escape_text is deprecated; use GLib.markup_escape_text instead)

Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
---
 meta/lib/oeqa/runtime/cases/gi.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/cases/gi.py b/meta/lib/oeqa/runtime/cases/gi.py
index 19073e52cba..7e16651df74 100644
--- a/meta/lib/oeqa/runtime/cases/gi.py
+++ b/meta/lib/oeqa/runtime/cases/gi.py
@@ -9,7 +9,7 @@ class GObjectIntrospectionTest(OERuntimeTestCase):
     @OETestDepends(["ssh.SSHTest.test_ssh"])
     @OEHasPackage(["python3-pygobject"])
     def test_python(self):
-        script = """from gi.repository import GObject; print(GObject.markup_escape_text("<testing&testing>"))"""
+        script = """from gi.repository import GLib; print(GLib.markup_escape_text("<testing&testing>"))"""
         status, output = self.target.run("python3 -c '%s'" % script)
         self.assertEqual(status, 0, msg="Python failed (%s)" % (output))
         self.assertEqual(output, "&lt;testing&amp;testing&gt;", msg="Unexpected output (%s)" % output)
-- 
2.17.1



More information about the Openembedded-core mailing list