Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package zim for openSUSE:Factory checked in at 2026-04-01 19:52:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/zim (Old) and /work/SRC/openSUSE:Factory/.zim.new.21863 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zim" Wed Apr 1 19:52:25 2026 rev:20 rq:1344084 version:0.76.3 Changes: -------- --- /work/SRC/openSUSE:Factory/zim/zim.changes 2025-03-31 11:45:24.209694866 +0200 +++ /work/SRC/openSUSE:Factory/.zim.new.21863/zim.changes 2026-04-01 19:54:06.109786445 +0200 @@ -1,0 +2,7 @@ +Wed Apr 1 09:57:24 UTC 2026 - Ana Guerrero <[email protected]> + +- Add patch to fix issue with python-gobject to 3.56.0 + zim-desktop-wiki/zim-desktop-wiki#2934 + 0001-Fix-bug-with-_object_widgets-weakset.patch + +------------------------------------------------------------------- New: ---- 0001-Fix-bug-with-_object_widgets-weakset.patch ----------(New B)---------- New: zim-desktop-wiki/zim-desktop-wiki#2934 0001-Fix-bug-with-_object_widgets-weakset.patch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ zim.spec ++++++ --- /var/tmp/diff_new_pack.omNvr5/_old 2026-04-01 19:54:06.801815190 +0200 +++ /var/tmp/diff_new_pack.omNvr5/_new 2026-04-01 19:54:06.801815190 +0200 @@ -1,7 +1,7 @@ # # spec file for package zim # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # Copyright (c) 2012 Matthias Propst. # # All modifications and additions to the file contributed by third parties @@ -28,6 +28,7 @@ Group: Productivity/Office/Organizers URL: https://zim-wiki.org Source: https://zim-wiki.org/downloads/%{name}-%{version}.tar.gz +Patch1: 0001-Fix-bug-with-_object_widgets-weakset.patch BuildRequires: fdupes # For directory ownership BuildRequires: %{python_module gobject >= 3.2} @@ -59,7 +60,7 @@ %lang_package %prep -%setup -q +%autosetup -p1 %build %python3_build ++++++ 0001-Fix-bug-with-_object_widgets-weakset.patch ++++++ >From c264b8bf58c6780b69f6370ecc27a09b2ef538e6 Mon Sep 17 00:00:00 2001 From: Jaap Karssenberg <[email protected]> Date: Thu, 26 Mar 2026 20:27:50 +0100 Subject: [PATCH 1/3] Fix bug with _object_widgets weakset Fixes #2934 --- tests/pageview.py | 2 +- tests/sourceview.py | 2 +- tests/tableeditor.py | 2 +- zim/gui/pageview/__init__.py | 4 ++-- zim/gui/pageview/textview.py | 13 ++++++------- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/pageview.py b/tests/pageview.py index 9ccc402a..41fbaa59 100644 --- a/tests/pageview.py +++ b/tests/pageview.py @@ -1919,7 +1919,7 @@ Foo 123 self.fail('No object in tree') buffer.set_parsetree(tree) - self.assertEqual(len(list(view._object_widgets)), 1) # assert there is an object in the view + self.assertEqual(len(list(view.get_inserted_object_widgets())), 1) # assert there is an object in the view self.assertParseTreeEqual(buffer, tree) # assert stable over roundtrip def testPopup(self): diff --git a/tests/sourceview.py b/tests/sourceview.py index fb94adad..4f72ec61 100644 --- a/tests/sourceview.py +++ b/tests/sourceview.py @@ -45,7 +45,7 @@ def dump(): ''' ) # test widget loaded - objects = list(pageview.textview._object_widgets) # XXX + objects = list(pageview.textview.get_inserted_object_widgets()) self.assertIsInstance(objects[0], SourceViewWidget) # test modify diff --git a/tests/tableeditor.py b/tests/tableeditor.py index af3c9ae3..98e40414 100644 --- a/tests/tableeditor.py +++ b/tests/tableeditor.py @@ -162,7 +162,7 @@ class TestPageViewWithPlugin(TestPageViewNoPlugin): text=TABLE_WIKI_TEXT, ) # test widget loaded - objects = list(pageview.textview._object_widgets) # XXX + objects = list(pageview.textview.get_inserted_object_widgets()) self.assertIsInstance(objects[0], TableViewWidget) # test modify diff --git a/zim/gui/pageview/__init__.py b/zim/gui/pageview/__init__.py index f1396fc6..705744be 100644 --- a/zim/gui/pageview/__init__.py +++ b/zim/gui/pageview/__init__.py @@ -1027,9 +1027,9 @@ class PageView(GSignalEmitterMixin, Gtk.VBox): self._save_page_handler.wait_for_store_page_async() def _hack_on_inserted_tree(self, *a): - if self.textview._object_widgets: + if self.textview.get_inserted_object_widgets(): # Force resize of the scroll window, forcing a redraw to fix - # glitch in allocation of embedded obejcts, see isse #642 + # glitch in allocation of embedded obejcts, see issue #642 # Will add another timeout to rendering the page, increasing the # priority breaks the hack though. Which shows the glitch is # probably also happening in a drawing or resizing idle event diff --git a/zim/gui/pageview/textview.py b/zim/gui/pageview/textview.py index 3e0c0760..e7c867c4 100644 --- a/zim/gui/pageview/textview.py +++ b/zim/gui/pageview/textview.py @@ -156,7 +156,6 @@ class TextView(Gtk.TextView): self.set_size_request(24, 24) self._cursor = CURSOR_TEXT self._cursor_link = None - self._object_widgets = weakref.WeakSet() self.set_left_margin(10) self.set_right_margin(5) self.set_wrap_mode(Gtk.WrapMode.WORD) @@ -172,10 +171,8 @@ class TextView(Gtk.TextView): def set_buffer(self, buffer): # Clear old widgets - for child in self.get_children(): - if isinstance(child, InsertedObjectWidget): - self._object_widgets.remove(child) - self.remove(child) + for widget in self.get_inserted_object_widgets(): + self.remove(widget) # Set new buffer Gtk.TextView.set_buffer(self, buffer) @@ -186,6 +183,9 @@ class TextView(Gtk.TextView): buffer.connect('insert-objectanchor', self.on_insert_object) + def get_inserted_object_widgets(self): + return [child for child in self.get_children() if isinstance(child, InsertedObjectWidget)] + def on_insert_object(self, buffer, anchor): # Connect widget for this view to object widget = anchor.create_widget() @@ -210,14 +210,13 @@ class TextView(Gtk.TextView): # TODO - compute indenting self.add_child_at_anchor(widget, anchor) - self._object_widgets.add(widget) widget.show_all() def on_size_allocate(self, *a): # Update size request for widgets wrap_width = self._get_object_wrap_width() if wrap_width != self._object_wrap_width: - for widget in self._object_widgets: + for widget in self.get_inserted_object_widgets(): widget.set_textview_wrap_width(wrap_width) # TODO - compute indenting self._object_wrap_width = wrap_width -- 2.53.0
