Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-nbxmpp for openSUSE:Factory checked in at 2022-10-11 18:02:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-nbxmpp (Old) and /work/SRC/openSUSE:Factory/.python-nbxmpp.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-nbxmpp" Tue Oct 11 18:02:11 2022 rev:35 rq:1009269 version:3.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-nbxmpp/python-nbxmpp.changes 2022-09-30 17:58:38.929358192 +0200 +++ /work/SRC/openSUSE:Factory/.python-nbxmpp.new.2275/python-nbxmpp.changes 2022-10-11 18:04:48.954013622 +0200 @@ -1,0 +2,7 @@ +Sat Oct 8 14:46:00 UTC 2022 - Alexei Sorokin <sor.ale...@meowr.ru> + +- Update to version 3.2.4: + * Tasks: Track timeouts within the task. + * MUC: Relax definition of MUC config change. + +------------------------------------------------------------------- Old: ---- python-nbxmpp-3.2.3.tar.bz2 New: ---- python-nbxmpp-3.2.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-nbxmpp.spec ++++++ --- /var/tmp/diff_new_pack.kWwdsT/_old 2022-10-11 18:04:49.422014379 +0200 +++ /var/tmp/diff_new_pack.kWwdsT/_new 2022-10-11 18:04:49.430014392 +0200 @@ -22,7 +22,7 @@ %define skip_python38 1 %define _name nbxmpp Name: python-nbxmpp -Version: 3.2.3 +Version: 3.2.4 Release: 0 Summary: XMPP library by Gajim team License: GPL-3.0-or-later ++++++ python-nbxmpp-3.2.3.tar.bz2 -> python-nbxmpp-3.2.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-3.2.3/ChangeLog new/python-nbxmpp-3.2.4/ChangeLog --- old/python-nbxmpp-3.2.3/ChangeLog 2022-09-28 22:54:59.000000000 +0200 +++ new/python-nbxmpp-3.2.4/ChangeLog 2022-10-08 16:37:57.000000000 +0200 @@ -1,3 +1,13 @@ +nbxmpp 3.2.4 (05 Oct 2022) + + Improvements + + * Tasks: Track timeouts within the task + + Bug Fixes + + * MUC: Relax definition of MUC config change + nbxmpp 3.2.3 (28 Sep 2022) Bug Fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-3.2.3/nbxmpp/__init__.py new/python-nbxmpp-3.2.4/nbxmpp/__init__.py --- old/python-nbxmpp-3.2.3/nbxmpp/__init__.py 2022-09-28 22:54:59.000000000 +0200 +++ new/python-nbxmpp-3.2.4/nbxmpp/__init__.py 2022-10-08 16:37:57.000000000 +0200 @@ -4,4 +4,4 @@ gi.require_version('Soup', '2.4') -__version__: str = '3.2.3' +__version__: str = '3.2.4' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-3.2.3/nbxmpp/structs.py new/python-nbxmpp-3.2.4/nbxmpp/structs.py --- old/python-nbxmpp-3.2.3/nbxmpp/structs.py 2022-09-28 22:54:59.000000000 +0200 +++ new/python-nbxmpp-3.2.4/nbxmpp/structs.py 2022-10-08 16:37:57.000000000 +0200 @@ -1057,7 +1057,7 @@ @property def is_muc_config_change(self) -> bool: - return self.body is None and bool(self.muc_status_codes) + return bool(self.muc_status_codes) @property def is_muc_pm(self) -> bool: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-3.2.3/nbxmpp/task.py new/python-nbxmpp-3.2.4/nbxmpp/task.py --- old/python-nbxmpp-3.2.3/nbxmpp/task.py 2022-09-28 22:54:59.000000000 +0200 +++ new/python-nbxmpp-3.2.4/nbxmpp/task.py 2022-10-08 16:37:57.000000000 +0200 @@ -28,6 +28,7 @@ from functools import wraps from gi.repository import Soup +from gi.repository import GLib from nbxmpp.modules.base import BaseModule from nbxmpp.simplexml import Node @@ -146,6 +147,7 @@ self._error = None self._user_data: Optional[Any] = None self._timeout: Optional[int] = None + self._timeout_id: Optional[int] = None self._finalize_func = None self._finalize_context = None self._state = TaskState.INIT @@ -177,6 +179,12 @@ if not self._state.is_init: raise RuntimeError('Task already started') + if self._timeout is not None: + self._logger.info('Add timeout for task: %s s, task id: %s', + self._timeout, id(self)) + self._timeout_id = GLib.timeout_add_seconds( + self._timeout, self._on_timeout) + self._state = TaskState.RUNNING next(self._gen) self._next_step(self) @@ -284,19 +292,36 @@ self._finalize_func = func self._finalize_context = context - def cancel(self): + def _on_timeout(self) -> None: + self._logger.info('Timeout reached, task id: %s', id(self)) + if not self._state.is_running: + return + + self._timeout_id = None + + if self._sub_task is not None: + self._sub_task.cancel(invoke_callbacks=False) + + self._error = TimeoutStanzaError() + self._set_finished() + + def cancel(self, invoke_callbacks: bool = True) -> None: if not self._state.is_running: return self._state = TaskState.CANCELLED if self._sub_task is not None: - self._sub_task.cancel() + self._sub_task.cancel(invoke_callbacks=False) self._error = CancelledError() - self._invoke_callbacks() + if invoke_callbacks: + self._invoke_callbacks() self._finalize() def _finalize(self): + if self._timeout_id is not None: + GLib.source_remove(self._timeout_id) + self._timeout_id = None self._done_callbacks.clear() self._sub_task = None self._error = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-nbxmpp-3.2.3/setup.cfg new/python-nbxmpp-3.2.4/setup.cfg --- old/python-nbxmpp-3.2.3/setup.cfg 2022-09-28 22:54:59.000000000 +0200 +++ new/python-nbxmpp-3.2.4/setup.cfg 2022-10-08 16:37:57.000000000 +0200 @@ -1,6 +1,6 @@ [metadata] name = nbxmpp -version = 3.2.3 +version = 3.2.4 description = XMPP Library author = Yann Leboulanger, Philipp Hoerist author_email = gajim-de...@gajim.org