From 7921c586073e95aa8007b961a6b461a228c061ff 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 ecbc4827..1fe2bac2 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__) @@ -88,7 +88,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) @@ -117,7 +117,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) @@ -164,7 +164,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) @@ -192,7 +192,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 5dc3be88553d8994d16caf5d165f13f94f382a94 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 93094d31..954106a9 100644 --- a/libportal/meson.build +++ b/libportal/meson.build @@ -68,7 +68,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')