All Versions
Latest Version
Avg Release Cycle
65 days
Latest Release
118 days ago

Changelog History
Page 1

  • v0.8.10 Changes

    October 01, 2021

    ๐Ÿš€ Release 0.8.10 is a minor release and contains two bug fixes for the HSM extension and changes how the 'self' literal string is handled.

    • Feature #545: The literal 'self' (default model parameter of Machine) has been replaced by the class variable Machine.self_literal = 'self'. Machine now performs an identity check (instead of a value check) with mod is self.self_literal to determine whether it should act as a model. While 'self' should still work when passed to the model parameter, we encourage using Machine.self_literal from now on. This was done to enable easier override of Machine.__eq__ in subclasses (thanks @VKSolovev).
    • ๐Ÿ› Bug #547: Introduce HierarchicalMachine.prefix_path to resolve global state names since the HSM stack is not reliable when queued=True (thanks @jankrejci).
    • ๐Ÿ› Bug #548: HSM source states were exited even though they are parents of the destination state (thanks @wes-public-apps).
  • v0.8.9 Changes

    September 01, 2021

    ๐Ÿ›  Release 0.8.9 is a minor release and contains a bugfix for HSM, a feature for GraphSupport and changes internal cache handling:

    • ๐Ÿ›  Bugfix #544: NestedEvent now wraps the machine's scope into partials passed to HierarchicalMachine._process. This prevents queued transitions from losing their scope.
    • ๐Ÿ”‹ Feature #533: (A)Graph.draw function (object returned by GraphMachine.get_graph()) can be passed a file/stream object as first parameter or None. The later will result in draw returning a binary string. (thanks @Blindfreddy).
    • ๐Ÿ”‹ Feature #532: Use id(model) instead of model for machine-bound caches in LockedMachine, AsyncMachine and GraphMachine. This might influence pickling (thanks @thedrow).
  • v0.8.8 Changes

    April 01, 2021

    ๐Ÿ›  Release 0.8.8 is a minor release and contains a bugfix and several new or improved features:

    • ๐Ÿ›  Bugfix #526: AsyncMachine does not remove models when remove_models is called (thanks @Plazas87)
    • ๐Ÿ”‹ Feature #517: Introduce try/except for finalize callbacks in Machine and HierachicalMachine. Thus, errors occurring in finalize callbacks will be suppressed and only the original error will be raised.
    • ๐Ÿ”‹ Feature #520: Show references in graphs and markup. Introduce MarkupMachine.format_references to tweak reference formatting (thanks @StephenCarboni)
    • ๐Ÿ”‹ Feature #485: Introduce Machine.on_exception to handle raised exceptions in callbacks (thanks @thedrow)
    • ๐Ÿ”‹ Feature #527: Machine.get_triggers now supports State and Enum as arguments (thanks @luup2k)
    • ๐Ÿ”‹ Feature #506: NestedState and HierachicalMachine.add_states now accept (lists of) states and enums as initial parameter
  • v0.8.7 Changes

    February 01, 2021

    ๐Ÿ›  Release 0.8.7 is a minor release and contains a bugfix, a feature and adjustments to internal processes:

    • ๐Ÿ”ง State configuration dictionaries passed to HierarchicalMachine can also use states as a keyword to define substates. If children and states are present, only children will be considered.
    • Feature #500: HierarchicalMachine with custom separator now adds is_state partials for nested states (e.g. is_C.s3.a()) to models (thanks @alterscape)
    • ๐Ÿ›  Bugfix #512: Use model_attribute consistently in AsyncMachine (thanks @thedrow)
    • โœ… Testing now treats most warnings as errors (thanks @thedrow)
    • As a consequence, pygraphviz.Agraph in diagrams_pygraphviz are now copied by transitions since AGraph.copy as of version 1.6 does not close temporary files appropriately
    • HierarchicalMachine now checks whether state_cls, event_cls and transition_cls have been subclassed from nested base classes (e.g. NestedState) to prevent hard to debug inheritance errors
  • v0.8.6 Changes

    December 01, 2020

    ๐Ÿ›  Release 0.8.6 is a minor release and contains bugfixes and new features:

    • HierarchicalMachine.add_states will raise a ValueError when an Enum name contains the currently used NestedState.separator.
    • ๐Ÿ›  Bugfix #486: Reset NestedState._scope when enter/exit callbacks raise an exception (thanks @m986883511)
    • Bugfix #488: Let HierarchicalMachine._get_trigger which is bound to model.trigger raise a MachineError for invalid events and AttributeError for unknown events (thanks @hsharrison)
    • Introduced HierarchicalMachine.has_trigger to determine whether an event is valid for an HSM
    • ๐Ÿ”‹ Feature #490: AsyncMachine features an event queue dictionary for individual models when queued='model' (thanks @jekel)
    • ๐Ÿ”‹ Feature #490: Machine.remove_model will now also remove model events from the event queue when queued=True
    • ๐Ÿ”‹ Feature #491: Machine.get_transitions and its HSM counterpart now accept Enum and State for source and dest (thanks @thedrow)
  • v0.8.5 Changes

    November 01, 2020

    ๐Ÿ›  Release 0.8.5 is a minor release and contains bugfixes:

    • AsyncMachine.switch_model_context is expected to be async now for easier integration of async code during model switch.
    • ๐Ÿ›  Bugfix #478: Initializing a machine with GraphSupport threw an exception when initial was set to a nested or parallel state (thanks @nickvazztau)
  • v0.8.4 Changes

    October 01, 2020

    ๐Ÿ›  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_tasks list which can be used to prevent transitions to cancel certain tasks.
    • Feature: Constructor of HierarchicalMachine now accepts substates ('A_1_c') and parallel states (['A', 'B']) as initial parameter
  • v0.8.3 Changes

    August 01, 2020

    ๐Ÿ›  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 of is_<state_name> when model_attribute != "state" to enable multiple versions of such convenience functions. A warning will be raised when is_<state_name> is used. (thanks @artofhuman)
    • Similarly, auto transitions (to_<state_name>) will be assigned as to_<model_attribute>_<state_name>. to_<state_name> will work as before but raise a warning until version 0.9.0.
    • ๐Ÿ›  Bugfix: allow_substates did not consider enum states
    • ๐Ÿ”‹ Feature: Nested enums can now be passed in a dict as children with initial parameter
    • 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/exit debug message emitted when callbacks have been processed.
    • Bugfix #370: Fix order of before_state_change/before and after/after_state_change in AsyncMachine (thanks @tzoiker and @vishes-shell)
    • Bugfix #470: Graph.get_graph() did not consider enum states when show_roi=True (thank @termim)
  • v0.8.2 Changes

    June 01, 2020

    ๐Ÿ›  Release 0.8.2 is a minor release and contains several bugfixes and improvements:

    • ๐Ÿ›  Bugfix #438: Improved testing without any optional graphviz package
    • Bugfix: _check_event_result failed when model was in parallel state
    • ๐Ÿ›  Bugfix #440: Only allow explicit dest=None in Machine.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.trigger now considers the machine's and current state's ignore_invalid_triggers attribute 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.AsyncTimeout as a state decorator to avoid threads used in transitions.extensions.state.Timeout (thanks @potens1)
    • ๐Ÿ”‹ Feature #444: transitions can now be tested online at
    • 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
  • v0.8.1 Changes

    April 01, 2020

    ๐Ÿ›  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 xdist for parallel testing with pytest (thanks @thedrow)