diff --git a/gobject/tests/gobject-query.py b/gobject/tests/gobject-query.py index 0325f70d2..84370a151 100644 --- a/gobject/tests/gobject-query.py +++ b/gobject/tests/gobject-query.py @@ -69,7 +69,8 @@ class TestGobjectQuery(unittest.TestCase): stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env, - universal_newlines=True, + text=True, + encoding='utf-8', ) info.check_returncode() out = info.stdout.strip()