-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Microwave example with parallel state working
- Loading branch information
Showing
19 changed files
with
406 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# StateMachine 3.05.0 | ||
|
||
*Not released yet* | ||
|
||
## What's new in 3.0.0 | ||
|
||
Statecharts are there! Now the library has support for Compound and Parallel states. | ||
|
||
### Python compatibility in 3.0.0 | ||
|
||
StateMachine 3.0.0 supports Python 3.9, 3.10, 3.11, 3.12, and 3.13. | ||
|
||
### In(state) checks in condition expressions | ||
|
||
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>')"`. | ||
|
||
|
||
## Bugfixes in 3.0.0 | ||
|
||
- Fixes [#XXX](https://github.com/fgmacedo/python-statemachine/issues/XXX). | ||
|
||
## Misc in 3.0.0 | ||
|
||
TODO. | ||
|
||
## Backward incompatible changes in 3.0 | ||
|
||
- Dropped support for Python `3.7` and `3.8`. If you need support for these versios use the 2.* series. | ||
|
||
|
||
## Non-RTC model removed | ||
|
||
This option was deprecated on version 2.3.2. Now all new events are put on a queue before being processed. | ||
|
||
|
||
## Multiple current states | ||
|
||
Due to the support of compound and parallel states, it's now possible to have multiple active states at the same time. | ||
|
||
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. | ||
|
||
```{note} | ||
To allow a smooth migration, these properties still work as before if there's no compound states in the state machine definition. | ||
``` | ||
|
||
Old | ||
|
||
```py | ||
def current_state(self) -> "State": | ||
``` | ||
|
||
New | ||
|
||
```py | ||
def current_state(self) -> "State | MutableSet[State]": | ||
``` | ||
|
||
We recomend using the new `sm.configuration` that has a stable API returning an `OrderedSet` on all cases: | ||
|
||
```py | ||
@property | ||
def configuration(self) -> OrderedSet["State"]: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.