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
feat: add done_state_ naming convention and complete StateChart docs
Add done_state_ prefix handling in factory.py alongside the existing
error_ convention. Attributes starting with done_state_ auto-register
both the underscore and dot forms (e.g., done_state_quest matches
both "done_state_quest" and "done.state.quest"). Only the prefix is
replaced, preserving multi-word state names (done_state_lonely_mountain
→ done.state.lonely_mountain).
Simplify existing tests, examples, and docs to use the convention
instead of explicit id= parameters.
Add comprehensive StateChart documentation: compound states, parallel
states, history pseudo-states, eventless transitions, DoneData,
delayed events, In() conditions, error.execution, and the new
done_state_ convention.
Copy file name to clipboardExpand all lines: docs/releases/3.0.0.md
+177-7Lines changed: 177 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# StateMachine 3.05.0
1
+
# StateMachine 3.0.0
2
2
3
3
*Not released yet*
4
4
@@ -20,10 +20,160 @@ To verify the standard adoption, now the automated tests suite includes several
20
20
While these are exiting news for the library and our community, it also introduces several backwards incompatible changes. Due to the major version release, the new behaviour is assumed by default, but we put
21
21
a lot of effort to minimize the changes needed in your codebase, and also introduced a few configuration options that you can enable to restore the old behaviour when possible. The following sections navigate to the new features and includes a migration guide.
22
22
23
+
### Compound states
24
+
25
+
**Compound states** have inner child states. Use `State.Compound` to define them
26
+
with Python class syntax — the class body becomes the state's children:
Events in one region don't affect others. See {ref}`statecharts` for full details.
87
+
23
88
### History pseudo-states
24
89
25
-
The **History pseudo-state** is a special state that is used to record the configuration of the state machine when leaving a compound state. When the state machine transitions into a history state, it will automatically transition to the state that was previously recorded. This allows the state machine to remember the configuration of its child states.
90
+
The **History pseudo-state** records the configuration of a compound state when it
91
+
is exited. Re-entering via the history state restores the previously active child.
92
+
Supports both shallow (`HistoryState()`) and deep (`HistoryState(deep=True)`) history:
0 commit comments