From 028c11ef68ac0e6cd6fac7efa504c71a6674c05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 22 Sep 2025 15:54:03 +0200 Subject: [PATCH 1/2] tests/notification: Use GioUnix to get InputStream Gio.UnixInputStream is deprecated since GLib 2.80 (and even broken in 2.86), so use the platform-implementation instead. See: https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/452 --- tests/pyportaltest/test_notification.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/pyportaltest/test_notification.py b/tests/pyportaltest/test_notification.py index 484c175e..7ebe01f1 100644 --- a/tests/pyportaltest/test_notification.py +++ b/tests/pyportaltest/test_notification.py @@ -8,7 +8,7 @@ import logging gi.require_version("Xdp", "1.0") -from gi.repository import GLib, Gio, Xdp +from gi.repository import GLib, Gio, GioUnix, Xdp logger = logging.getLogger(__name__) @@ -96,7 +96,7 @@ def test_add_notification_bytes_icon(self): assert dict(notification) == notification_to_set_dict (icon_type, handle) = icon assert icon_type == "file-descriptor" - input_stream = Gio.UnixInputStream.new(handle.take(), True) + input_stream = GioUnix.InputStream.new(handle.take(), True) res_bytes = input_stream.read_bytes(bytes.get_size(), None) assert res_bytes.equal(bytes) @@ -128,7 +128,7 @@ def test_add_notification_file_icon(self): assert dict(notification) == notification_to_set_dict (icon_type, handle) = icon assert icon_type == "file-descriptor" - input_stream = Gio.UnixInputStream.new(handle.take(), True) + input_stream = GioUnix.InputStream.new(handle.take(), True) res_bytes = input_stream.read_bytes(bytes.get_size(), None) assert res_bytes.equal(bytes) @@ -183,7 +183,7 @@ def test_add_notification_bytes_sound(self): assert dict(notification) == notification_to_set_dict (sound_type, handle) = sound assert sound_type == "file-descriptor" - input_stream = Gio.UnixInputStream.new(handle.take(), True) + input_stream = GioUnix.InputStream.new(handle.take(), True) res_bytes = input_stream.read_bytes(bytes.get_size(), None) assert res_bytes.equal(bytes) @@ -216,7 +216,7 @@ def test_add_notification_file_sound(self): assert dict(notification) == notification_to_set_dict (sound_type, handle) = sound_out assert sound_type == "file-descriptor" - input_stream = Gio.UnixInputStream.new(handle.take(), True) + input_stream = GioUnix.InputStream.new(handle.take(), True) res_bytes = input_stream.read_bytes(bytes.get_size(), None) assert res_bytes.equal(bytes) From 347e4da71e918d995c8c6e25480fa2e4a54e294e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 22 Sep 2025 15:56:36 +0200 Subject: [PATCH 2/2] libportal: Bump dependency on gio 2.80 It' mostly a test-dependency only, but it's old enough to just use it for everything --- libportal/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libportal/meson.build b/libportal/meson.build index 115cb114..c9ca1d44 100644 --- a/libportal/meson.build +++ b/libportal/meson.build @@ -70,7 +70,7 @@ src = [ generated_files, ] -gio_dep = dependency('gio-2.0', version: '>= 2.72') +gio_dep = dependency('gio-2.0', version: '>= 2.80') gio_unix_dep = dependency('gio-unix-2.0') install_headers(public_headers, subdir: 'libportal')