Releases: pytransitions/transitions
Release 0.8.5
Release 0.8.5 is a minor release and contains bugfixes:
AsyncMachine.switch_model_contextis expected to beasyncnow for easier integration of async code during model switch.- Bugfix #478: Initializing a machine with
GraphSupportthrew an exception when initial was set to a nested or parallel state (thanks @nickvazztau)
Release 0.8.4
Release 0.8.4 is a minor release and contains bugfixes as well as new features:
- Bugfix #477: Model callbacks were not added to a LockedHierarchicalMachine when the machine itself served as a model (thanks @oliver-goetz)
- Bugfix #475: Clear collection of tasks to prevent memory leak when initializing many models (thanks @h-nakai)
- Feature #474: Added static
AsyncMachine.protected_taskslist which can be used to preventtransitionsto cancel certain tasks. - Feature: Constructor of
HierarchicalMachinenow accepts substates ('A_1_c') and parallel states (['A', 'B']) asinitialparameter
Release 0.8.3
Release 0.8.3 is a minor release and contains several bugfixes mostly related to HierarchicalStateMachine:
- Feature #473: Assign
is_<model_attribute>_<state_name>instead ofis_<state_name>whenmodel_attribute != "state"to enable multiple versions of such convenience functions. A warning will be raised whenis_<state_name>is used. (thanks @artofhuman) - Similarly, auto transitions (
to_<state_name>) will be assigned asto_<model_attribute>_<state_name>.to_<state_name>will work as before but raise a warning until version 0.9.0. - Bugfix:
allow_substatesdid not consider enum states - Feature: Nested enums can now be passed in a dict as
childrenwithinitialparameter - Bugfix #449: get_triggers/get_transitions did not return nested triggers correctly (thanks @alexandretanem)
- Feature #452: Improve handling of label attributes in custom diagram states and
TransitionGraphSupport(thanks @badiku) - Bugfix #456: Prevent parents from overriding (falsy) results of their children's events (thanks @alexandretanem)
- Bugfix #458: Entering the same state caused key errors when transition was defined on a parent (thanks @matlom)
- Bugfix #459: Do not remove current timeout runner in AsyncTimeout to prevent accidental overrides (thanks @rgov)
- Rewording of
State.enter/exitdebug message emitted when callbacks have been processed. - Bugfix #370: Fix order of
before_state_change/beforeandafter/after_state_changeinAsyncMachine(thanks @tzoiker and @vishes-shell) - Bugfix #470:
Graph.get_graph()did not considerenumstates whenshow_roi=True(thank @termim)
Release 0.8.2
Release 0.8.2 is a minor release and contains several bugfixes and improvements:
- Bugfix #438: Improved testing without any optional
graphvizpackage - Bugfix:
_check_event_resultfailed when model was in parallel state - Bugfix #440: Only allow explicit
dest=NoneinMachine.add_transition(not just falsy) for internal transitions (thanks @Pathfinder216) - Bugfix #419: Fix state creation of nested enums (thanks @thedrow)
- Bugfix #428: HierarchicalGraphMachine did not find/apply styling for parallel states (thanks @xiaohuihui1024)
- Bugfix:
Model.triggernow considers the machine's and current state'signore_invalid_triggersattribute and can be called with non-existing events (thanks @potens1) - Bugfix: Child states may not have been exited when the executed transition had been defined on a parent (thanks @thedrow)
- Feature #429: Introduced
transitions.extensions.asyncio.AsyncTimeoutas a state decorator to avoid threads used intransitions.extensions.state.Timeout(thanks @potens1) - Feature #444:
transitionscan now be tested online at mybinder.org - PR #418: Use sets instead of lists to cache already covered transitions in nested state machines (thanks @thedrow)
- PR #422: Improve handling of unresolved attributes for easier inheritance (thanks @thedrow)
- PR #445: Refactored AsyncMachine to enable trio/anyio override
Release 0.8.1
Release 0.8.1 is a minor release of HSM improvements and bugfixes in the diagram and async extension
- Feature: Introduced experimental
HierarchicalAsync(Graph)Machine - Feature #405: Support for nested Enums in
HierarchicalMachine(thanks @thedrow) - Bugfix #400: Fix style initialization when initial state is an
Enum(thanks @kbinpgh) - Bugfix #403: AsyncMachine.dispatch now returns a boolean as expected (thanks @thedrow)
- Bugfix #413: Improve diagram output for
HierarchicalMachine(thanks @xiaohuihui1024) - Increased coverage (thanks @thedrow)
- Introduced
xdistfor parallel testing withpytest(thanks @thedrow)
Release 0.8.0
Release 0.8.0 is a major release and introduces asyncio support for Python 3.7+, parallel state support and some bugfixes
- Feature:
HierarchicalMachinehas been rewritten to support parallel states. Please have a look at the ReadMe.md to check what has changed.- The previous version can be found in
transitions.extensions.nesting_legacyfor now
- The previous version can be found in
- Feature: Introduced
AsyncMachine(see discussion #259); note that async HSMs are not yet supported - Feature #390: String callbacks can now point to properties and attributes (thanks @jsenecal)
- Bugfix: Auto transitions are added multiple times when add_states is called more than once
- Bugfix: Convert state._name from
Enuminto strings inMarkupMachinewhen necessary - Bugfix #392: Allow
Machine.add_ordered_transitionsto be called without the initial state (thanks @mkaranki and @facundofc) GraphMachinenow attempts to fall back tographvizwhen importingpygraphvizfails- Not implemented/tested so far (contributions are welcome!):
- Proper Graphviz support of parallel states
- AsyncHierachicalMachine
Release 0.7.2
Release 0.7.2 is a minor release and contains bugfixes and and a new feature:
- Bugfix #386: Fix transitions for enums with str behavior (thanks @artofhuman)
- Bugfix #378: Don't mask away KeyError when executing a transition (thanks @facundofc)
- Feature #387: Add support for dynamic model state attribute (thanks @v1k45)
Release 0.7.1
Release 0.7.1 is a minor release and contains several documentation improvements and a new feature:
- Feature #334: Added Enum (Python 3.4+:
enumPython 2.7:enum34) support (thanks @artofhuman and @justinttl) - Replaced test framework
nosetestswithpytest(thanks @artofhuman) - Extended
add_ordered_transitionsdocumentation inReadme.md - Collected code snippets from earlier discussions in
examples/Frequently asked questions.ipynb - Improved stripping of
long_descriptioninsetup.py(thanks @artofhuman)
Release 0.7.0
Release 0.7.0 is a major release with fundamental changes to the diagram extension. It also introduces an intermediate MarkupMachine which can be used to transfer and (re-)initialize machine configurations.
- Feature #263:
MarkupMachinecan be used to retrieve a Machine's dictionary representationGraphMachineuses this representation for Graphs now and does not rely onMachineattributes any longer
- Feature: The default value of
State.ignore_invalid_triggerschanged toNone. If it is not explicitly set, theMachine's value is used instead. - Feature #325: transitions now supports
pygraphvizandgraphvizfor the creation of diagrams. Currently,GraphMachinewill check forpygraphvizfirst and fall back tographviz. To usegraphvizdirectly passuse_pygraphiv=Falseto the constructor ofGraphMachine - Diagram style has been overhauled. Have a look at
GraphMachine's attributesmachine_attributesandstyle_attributesto adjust it to your needs. - Feature #305: Timeouts and other features are now marked in the graphs
- Bugfix #343:
get_graphwas not assigned to models added during machine runtime
Release 0.6.9
this closes #320