Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-transitions for openSUSE:Factory checked in at 2022-01-13 23:21:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-transitions (Old) and /work/SRC/openSUSE:Factory/.python-transitions.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-transitions" Thu Jan 13 23:21:16 2022 rev:11 rq:946130 version:0.8.10 Changes: -------- --- /work/SRC/openSUSE:Factory/python-transitions/python-transitions.changes 2021-10-26 20:14:23.586031972 +0200 +++ /work/SRC/openSUSE:Factory/.python-transitions.new.1892/python-transitions.changes 2022-01-13 23:21:56.408067059 +0100 @@ -1,0 +2,9 @@ +Tue Jan 11 21:26:06 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Add support for Python 3.10 + * transitions-fixpy310.patch -- gh#pytransitions/transitions#559 +- Make sure the graphviz tests don't error out without an installed + font +- Clean obsolete python36 conditionals + +------------------------------------------------------------------- New: ---- transitions-fixpy310.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-transitions.spec ++++++ --- /var/tmp/diff_new_pack.MtyFw7/_old 2022-01-13 23:21:56.940067407 +0100 +++ /var/tmp/diff_new_pack.MtyFw7/_new 2022-01-13 23:21:56.944067410 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-transitions # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2019-2021, Martin Hauke <mar...@gmx.de> # # All modifications and additions to the file contributed by third parties @@ -27,6 +27,8 @@ Group: Development/Languages/Python URL: https://github.com/pytransitions/transitions Source: https://files.pythonhosted.org/packages/source/t/transitions/transitions-%{version}.tar.gz +# PATCH-FIX-UPSTREAM transitions-fixpy310.patch -- gh#pytransitions/transitions#559 +Patch0: transitions-fixpy310.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -36,17 +38,17 @@ BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module dill} +BuildRequires: %{python_module graphviz} BuildRequires: %{python_module pycodestyle} +BuildRequires: %{python_module pygraphviz} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} -# pygraphviz dropped support for Python 3.6 -BuildRequires: %{python_module graphviz if (%python-base without python36-base)} -BuildRequires: %{python_module pygraphviz if (%python-base without python36-base)} %if %{with python2} BuildRequires: python2-mock %endif # png support for graphviz BuildRequires: graphviz-gnome +BuildRequires: noto-sans-fonts # /SECTION %python_subpackages @@ -55,7 +57,7 @@ implement FSMs (finite state machines) in python. %prep -%setup -q -n transitions-%{version} +%autosetup -p 1 -n transitions-%{version} find . -type f -exec chmod -x {} \; sed -i 's/\r$//' LICENSE Changelog.md README.md @@ -67,7 +69,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest --ignore tests/test_codestyle.py +%pytest -k "not TestCodeFormat" %files %{python_files} %license LICENSE ++++++ transitions-fixpy310.patch ++++++ Index: transitions-0.8.10/tests/test_async.py =================================================================== --- transitions-0.8.10.orig/tests/test_async.py +++ transitions-0.8.10/tests/test_async.py @@ -130,9 +130,6 @@ class TestAsync(TestTransitions): self.assertTrue(mock.called) def test_multiple_models(self): - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) - m1 = self.machine_cls(states=['A', 'B', 'C'], initial='A', name="m1") m2 = self.machine_cls(states=['A'], initial='A', name='m2') m1.add_transition(trigger='go', source='A', dest='B', before=self.cancel_soon) @@ -141,12 +138,13 @@ class TestAsync(TestTransitions): m1.add_transition(trigger='reset', source='C', dest='A') m2.add_transition(trigger='go', source='A', dest=None, conditions=m1.is_C, after=m1.reset) - loop.run_until_complete(asyncio.gather(m1.go(), # should block before B - self.call_delayed(m1.fix, 0.05), # should cancel task and go to C - self.call_delayed(m1.check, 0.07), # should exit before m1.fix - self.call_delayed(m2.go, 0.1))) # should cancel m1.fix - assert m1.is_A() - loop.close() + async def run(): + _ = asyncio.gather(m1.go(), # should block before B + self.call_delayed(m1.fix, 0.05), # should cancel task and go to C + self.call_delayed(m1.check, 0.07), # should exit before m1.fix + self.call_delayed(m2.go, 0.1)) # should cancel m1.fix + assert m1.is_A() + asyncio.run(run()) def test_async_callback_arguments(self): Index: transitions-0.8.10/transitions/extensions/states.py =================================================================== --- transitions-0.8.10.orig/transitions/extensions/states.py +++ transitions-0.8.10/transitions/extensions/states.py @@ -96,7 +96,7 @@ class Timeout(State): """ if self.timeout > 0: timer = Timer(self.timeout, self._process_timeout, args=(event_data,)) - timer.setDaemon(True) + timer.daemon = True timer.start() self.runner[id(event_data.model)] = timer return super(Timeout, self).enter(event_data)