From: Stuart Prescott <stuart@debian.org>
Date: Sat, 10 May 2025 14:16:23 +1000
Subject: Work around pygobject iterator

Picked from https://github.com/Cimbali/pympress/issues/330
Works around a missing __iter__ method in GPropsIter in pygobject; this is fixed
by pygobject upstream 3.51 but that fix will not likely make it into trixie.
This patch should be dropped during the forky development cycle.

Closes: #1096318
---
 pympress/builder.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pympress/builder.py b/pympress/builder.py
index d6f60e2..b4c39c1 100644
--- a/pympress/builder.py
+++ b/pympress/builder.py
@@ -76,7 +76,7 @@ class Builder(Gtk.Builder):
         Args:
             a_widget (:class:`~GObject.Object`): an object built by the builder, usually a widget
         """
-        for str_prop in (prop.name for prop in a_widget.props if prop.value_type == GObject.TYPE_STRING):
+        for str_prop in (prop.name for prop in list(a_widget.props) if prop.value_type == GObject.TYPE_STRING):
             try:
                 str_val = getattr(a_widget.props, str_prop)
                 if str_val:
