Releases: mriehl/fysom
Fixed issue with python3
pip install on native python3 systems (like arch) was failing due to a syntax error in the bdist_rpm
section of setup.cfg
.
This was breaking pip install fysom
because configparser validates the full file.
Many thanks to Ben for reporting this issue!
Added wildcard support for events source, final state definition
Props go to @ctbk for the features.
Now you can define events which are valid in every state of the FSM, by using src='*'
in the event definition or even by omitting the src
attribute.
If you define the final
state of the state machine, the shorthand method is_finished()
returns true if the machine is in that particular state.
Both features are ported from Jake Gordon's FSM.
v1.0.12
Added support for positional arguments to events.
Thanks to @ctbk!
Useful if you want to use events as callbacks in async coding, getting everything they were called with.
i.e. in tornado IOStream:
io_stream.read_until_close(fsm.done_reading)
in the callback for process_data
state it will be possible to access the data
with e.args[0]