You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Changelog.md
+9-4
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,22 @@
1
1
# Changelog
2
2
3
-
## 0.6.6 ()
3
+
## 0.6.6 (May, 2018)
4
4
5
-
-`HierarchicalMachine` now considers the initial state of `NestedState` instances/names passed to `initial`.
5
+
Release 0.6.6 is a minor release and contains several bugfixes and new features:
6
+
7
+
- Bugfix: `HierarchicalMachine` now considers the initial state of `NestedState` instances/names passed to `initial`.
6
8
- Bugfix: `HierarchicalMachine` used to ignore children when `NestedStates` were added to the machine.
7
-
- Feature: Added `Machine.dispatch` to trigger events on all models assigned to `Machine`.
9
+
- Bugfix #300: Fixed missing brackets in `TimeoutState` (thanks @Synss)
10
+
- Feature #289: Introduced `Machine.resolve_callable(func, event_data)` to enable customization of callback definitions (thanks @ollamh and @paulbovbel)
11
+
- Feature #299: Added support for internal transitions with `dest=None` (thanks @maueki)
12
+
- Feature: Added `Machine.dispatch` to trigger events on all models assigned to `Machine`
8
13
9
14
## 0.6.5 (April, 2018)
10
15
11
16
Release 0.6.5 is a minor release and contains a new feature and a bugfix:
12
17
13
18
- Feature #287: Embedding `HierarchicalMachine` will now reuse the machine's `initial` state. Passing `initial: False` overrides this (thanks @mrjogo).
14
-
- Bugfix #292: Models using `GraphMashine` were not picklable in the past due to `graph` property. Graphs for each model are now stored in `GraphMachine.model_graphs` (thanks @ansumanm)
19
+
- Bugfix #292: Models using `GraphMashine` were not picklable in the past due to `graph` property. Graphs for each model are now stored in `GraphMachine.model_graphs` (thanks @ansumanm).
A common desire is for state transitions to follow a strict linear sequence. For instance, given states `['A', 'B', 'C']`, you might want valid transitions for `A` → `B`, `B` → `C`, and `C` → `A` (but no other pairs).
468
478
@@ -675,7 +685,37 @@ print(lump.state)
675
685
>>> initial
676
686
```
677
687
678
-
### <aname="execution-order"> Execution order
688
+
### <aname="execution-order"> Callback resolution and execution order
689
+
690
+
As you have probably already realized, the standard way of passing callbacks to states and transitions is by name.
691
+
When processing callbacks, Transitions will use the name to retrieve the related callback from the model.
692
+
If the method cannot be retrieved and it contains dots, Transitions will treat the name as a path to a module function and try to import it.
693
+
Alternatively, you can pass callables such as (bound) functions directly.
0 commit comments