Release 0.9.1 is a minor release and contains several bugfixes and some (typing) improvements. This release also introduces on_final
callbacks on machines (as well as NestedState
) and final
flags for states.
- Bug #594: Fix may_ always returning false for internal transitions (thanks @a-schade)
- PR #592: Pass investigated transition to
EventData
context in 'may' check (thanks @msclock) - PR #634: Improve the handling of diagrams when working with parallel states, especially when using the show_roi option (thanks @seanxlliu)
- Bug #619/#639:
Exception
is not broad enough and does not catchasyncio.CancelledError
orKeyboardInterrupt
; useBaseException
instead (thanks @e0lithic and @ofacklam) - '_anchor' suffix has been removed for (py)graphviz cluster node anchors
- local testing switched from tox to nox
- PR #633: Remove surrounding whitespace from docstrings (thanks @artofhuman)
- PR #665: Add
on_final
toMachine
andNestedState
constructor andfinal
toState
. Callbacks passed toon_final
will be executed when a State withfinal=True
is entered or all children of a parallel state are final. - Bug #626: Process exceptions with
Machine.on_exception
in may_ as well (thanks @match1) - PR #666: Improved handling of removing transitions for
GraphMachine
andHiearachicalMachine
(thanks @drpjm) - PR #667: Better handling of unset styling in
GraphMachine
- Typing:
- Added
--strict
mypy flag fortransitions
type checks (nottests
though) - Made state, event and machine property mandatory in (Nested)EventData
- Transition.dest may be None
- Introduced (Async)CallbackFunc to declutter callback-related signatures
- Add stub file for extension package for explicite reexport (thanks @DrewDevereux)
- Added