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
Statecharts are there! Now the library has support for Compound and Parallel states.
8
+
9
+
### Python compatibility in 3.0.0
10
+
11
+
StateMachine 3.0.0 supports Python 3.9, 3.10, 3.11, 3.12, and 3.13.
12
+
13
+
### In(state) checks in condition expressions
14
+
15
+
Now a condition can check if the state machine current set of active states (a.k.a `configuration`) contains a state using the syntax `cond="In('<state-id>')"`.
- Dropped support for Python `3.7` and `3.8`. If you need support for these versios use the 2.* series.
29
+
30
+
31
+
## Non-RTC model removed
32
+
33
+
This option was deprecated on version 2.3.2. Now all new events are put on a queue before being processed.
34
+
35
+
36
+
## Multiple current states
37
+
38
+
Due to the support of compound and parallel states, it's now possible to have multiple active states at the same time.
39
+
40
+
This introduces an impedance mismatch into the old public API, specifically, `sm.current_state` is deprecated and `sm.current_state_value` can returns a flat value if no compound state or a `list` instead.
41
+
42
+
```{note}
43
+
To allow a smooth migration, these properties still work as before if there's no compound states in the state machine definition.
44
+
```
45
+
46
+
Old
47
+
48
+
```py
49
+
defcurrent_state(self) -> "State":
50
+
```
51
+
52
+
New
53
+
54
+
```py
55
+
defcurrent_state(self) -> "State | MutableSet[State]":
56
+
```
57
+
58
+
We recomend using the new `sm.configuration` that has a stable API returning an `OrderedSet` on all cases:
0 commit comments