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
refactor!: modernize codebase for v3 — remove deprecated APIs, migrate tests to StateChart (#565)
* feat!: remove add_observer() and short registry names (deprecated since v2.x)
- Remove `add_observer()` method (deprecated v2.3.2, use `add_listener()`)
- Remove short name registration in registry (deprecated v0.8, use fully qualified names)
- Update release notes and upgrade guide accordingly
* feat!: change States.from_enum default to use_enum_instance=True
Fulfills the deprecation promise from v2.3.3. The enum instance is now
used as the state value by default. Pass use_enum_instance=False to get
the previous behavior of using the raw enum value.
* test: add dedicated backward-compat tests for StateMachine (v2 API)
Cover all four flag defaults, TransitionNotAllowed behavior (sync and
async), error_on_execution=False propagation, self-transition entries,
current_state deprecated property, and basic smoke tests.
* refactor(tests): migrate conftest fixtures from StateMachine to StateChart
- Switch all 7 inline fixture classes to StateChart
- Add error_on_execution=False to validator fixture (test expects direct propagation)
- Remove classic_traffic_light_machine_allow_event subclass (redundant with StateChart default)
- Remove TransitionNotAllowed tests from test_statemachine.py (covered by compat tests)
* refactor(tests): migrate main test files from StateMachine to StateChart
- test_statemachine.py: all classes → StateChart, current_state → is_active
- test_copy.py: all classes → StateChart, current_state → is_active
- test_async.py: all classes → StateChart with explicit flags where needed
(allow_event_without_transition=False, error_on_execution=False)
* refactor(tests): migrate remaining test files from StateMachine to StateChart
Migrate 18 test files to use StateChart as base class. For tests that
depend on StateMachine-specific behavior (TransitionNotAllowed, error
propagation), explicit flags are added (allow_event_without_transition=False,
error_on_execution=False).
* refactor(tests): migrate testcases, Django and SCXML tests to StateChart
* docs: update source doctests to use StateChart as primary API
* docs: update release notes and upgrade guide for v3 breaking changes
0 commit comments