From f23172b0be8359af1802b7eca7519499c52802a4ff03e26a270706b713ad496e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 12 Jan 2024 08:27:19 +0000 Subject: [PATCH] - update to 0.9.0: * removed legacy implementation of `HierarchicalMachine` from the package * Bug #551: Fix active state styling in `GraphMachine` (thanks @betaboon) * Bug #554: Fix issues related to scopes and queueing in `HierachicalMachine` (thanks @jankrejci) * Bug #568: Reflexive transitions (dest: '=') had not been resolved correctly when source was a wildcard (thanks @jnu) * Bug #568: HSM did not detect reflexive transitions if src was a parent state (thanks @lostcontrol) * Bug #569: Fix implicit fallback to `graphviz` when `pygraphviz` was not installed (thanks @FridjofAmundsen) * Bug #580: Fix `on_timeout` callback resolution when timeout had been initialized with `timeout=0` (thanks @Rysbai) * Bug #582: Last label in `GraphSupport` was not correctly aligned when `show_attributes=True` (thanks @spagh-eddie) * Feature: Add pyi stub files for better type hinting. Since many functions and constructors allow rather arbitrary arguments time will tell whether typing should be strict (and cause more mypy issues) or more relaxed (and thus less precise). * Feature: Reviewed and improved method documentation * Feature #549: Add `may` transition check to transitions (thanks @artofhuman) * Feature #552: Refactored error handling to be able to handle `MachineError` in `on_exception` callbacks (thanks @kpihus) * Feature: Add `mypy` to test workflow * PR #461: Add `Retry` state to supported state stereotypes (thanks @rgov) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=20 --- python-transitions.changes | 47 +++++++++++++++++++++++++++++++++++++ python-transitions.spec | 11 ++------- transitions-0.8.10.tar.gz | 3 --- transitions-0.9.0.tar.gz | 3 +++ transitions-fixpy310.patch | 48 -------------------------------------- 5 files changed, 52 insertions(+), 60 deletions(-) delete mode 100644 transitions-0.8.10.tar.gz create mode 100644 transitions-0.9.0.tar.gz delete mode 100644 transitions-fixpy310.patch diff --git a/python-transitions.changes b/python-transitions.changes index 2b9a31e..bdf06d8 100644 --- a/python-transitions.changes +++ b/python-transitions.changes @@ -1,3 +1,50 @@ +------------------------------------------------------------------- +Fri Jan 12 08:26:55 UTC 2024 - Dirk Müller + +- update to 0.9.0: + * removed legacy implementation of `HierarchicalMachine` from + the package + * Bug #551: Fix active state styling in `GraphMachine` (thanks + @betaboon) + * Bug #554: Fix issues related to scopes and queueing in + `HierachicalMachine` (thanks @jankrejci) + * Bug #568: Reflexive transitions (dest: '=') had not been + resolved correctly when source was a wildcard (thanks @jnu) + * Bug #568: HSM did not detect reflexive transitions if src was + a parent state (thanks @lostcontrol) + * Bug #569: Fix implicit fallback to `graphviz` when + `pygraphviz` was not installed (thanks @FridjofAmundsen) + * Bug #580: Fix `on_timeout` callback resolution when timeout + had been initialized with `timeout=0` (thanks @Rysbai) + * Bug #582: Last label in `GraphSupport` was not correctly + aligned when `show_attributes=True` (thanks @spagh-eddie) + * Feature: Add pyi stub files for better type hinting. Since + many functions and constructors allow rather arbitrary + arguments time will tell whether typing should be strict (and + cause more mypy issues) or more relaxed (and thus less + precise). + * Feature: Reviewed and improved method documentation + * Feature #549: Add `may` transition check to transitions + (thanks @artofhuman) + * Feature #552: Refactored error handling to be able to handle + `MachineError` in `on_exception` callbacks (thanks @kpihus) + * Feature: Add `mypy` to test workflow + * PR #461: Add `Retry` state to supported state stereotypes + (thanks @rgov) + * Internal: `Machine._identify_callback` has been converted to + instance method from class method + * Internal: `LockedMachine._get_qualified_state_name` has been + converted to instance method from static method + * Internal: Removed `_super` workaround related to dill (see + https://github.com/pytransitions/transitions/issues/236) + * ## 0.8.11 (February 2022) + * Release 0.8.11 is the last 0.8 release and contains fixes for + Python 3.10 compatibility issues + * Bug #559: Rewrote an async test and replaced `setDaemon` with + `daemon` property assignment for thread handling (thanks + @debalance) +- drop transitions-fixpy310.patch (upstream) + ------------------------------------------------------------------- Tue Jan 11 21:26:06 UTC 2022 - Ben Greiner diff --git a/python-transitions.spec b/python-transitions.spec index 52205d5..1c4660c 100644 --- a/python-transitions.spec +++ b/python-transitions.spec @@ -1,7 +1,7 @@ # # spec file for package python-transitions # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # Copyright (c) 2019-2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -17,18 +17,14 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without python2 Name: python-transitions -Version: 0.8.10 +Version: 0.9.0 Release: 0 Summary: A lightweight, object-oriented Python state machine implementation License: MIT 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 @@ -43,9 +39,6 @@ BuildRequires: %{python_module pycodestyle} BuildRequires: %{python_module pygraphviz} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six} -%if %{with python2} -BuildRequires: python2-mock -%endif # png support for graphviz BuildRequires: graphviz-gnome BuildRequires: noto-sans-fonts diff --git a/transitions-0.8.10.tar.gz b/transitions-0.8.10.tar.gz deleted file mode 100644 index ec0b58d..0000000 --- a/transitions-0.8.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0385975a842e885c1a55c719d2f90164471665794d39d51f9eb3f11e1d9c8ac -size 1150941 diff --git a/transitions-0.9.0.tar.gz b/transitions-0.9.0.tar.gz new file mode 100644 index 0000000..c6ec9c1 --- /dev/null +++ b/transitions-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f54d11bdb225779d7e729011e93a9fb717668ce3dc65f8d4f5a5d7ba2f48e10 +size 1162948 diff --git a/transitions-fixpy310.patch b/transitions-fixpy310.patch deleted file mode 100644 index 630b602..0000000 --- a/transitions-fixpy310.patch +++ /dev/null @@ -1,48 +0,0 @@ - -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)