Changelog History
Page 1
-
v0.9.0 Changes
September 01, 2022๐ Release 0.9.0 is a major release and contains improvements to ease development, adds some new features and removes the legacy hierarchical machine:
- โ removed legacy implementation of
HierarchicalMachine
from the package - ๐ Bug #551: Fix active state styling in
GraphMachine
(thanks @betaboon) - ๐ Bug #554: Fix issues related to scopes and queueing in
HierachicalMachine
(thanks @jankrejci) - ๐ Bug #568: Reflexive transitions (dest: '=') had not been resolved correctly when source was a wildcard (thanks @jnu)
- ๐ Bug #568: HSM did not detect reflexive transitions if src was a parent state (thanks @lostcontrol)
- ๐ Bug #569: Fix implicit fallback to
graphviz
whenpygraphviz
was not installed (thanks @FridjofAmundsen) - ๐ Bug #580: Fix
on_timeout
callback resolution when timeout had been initialized withtimeout=0
(thanks @Rysbai) - ๐ Bug #582: Last label in
GraphSupport
was not correctly aligned whenshow_attributes=True
(thanks @spagh-eddie) - ๐ Feature: Add pyi stub files for better type hinting. Since many functions and constructors allow rather arbitrary arguments time will tell whether typing should be strict (and cause more mypy issues) or more relaxed (and thus less precise).
- ๐ Feature: Reviewed and improved method documentation
- ๐ Feature #549: Add
may
transition check to transitions (thanks @artofhuman) - ๐ Feature #552: Refactored error handling to be able to handle
MachineError
inon_exception
callbacks (thanks @kpihus) - ๐ Feature: Add
mypy
to test workflow - ๐ PR #461: Add
Retry
state to supported state stereotypes (thanks @rgov) - Internal:
Machine._identify_callback
has been converted to instance method from class method - Internal:
LockedMachine._get_qualified_state_name
has been converted to instance method from static method - ๐ Internal: Removed
_super
workaround related to dill (see https://github.com/pytransitions/transitions/issues/236)
- โ removed legacy implementation of
-
v0.8.11 Changes
February 01, 2022๐ Release 0.8.11 is the last 0.8 release and contains fixes for Python 3.10 compatibility issues
- ๐ Bug #559: Rewrote an async test and replaced
setDaemon
withdaemon
property assignment for thread handling (thanks @debalance)
- ๐ Bug #559: Rewrote an async test and replaced
-
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 variableMachine.self_literal = 'self'
.Machine
now performs an identity check (instead of a value check) withmod is self.self_literal
to determine whether it should act as a model. While 'self' should still work when passed to themodel
parameter, we encourage usingMachine.self_literal
from now on. This was done to enable easier override ofMachine.__eq__
in subclasses (thanks @VKSolovev). - ๐ Bug #547: Introduce
HierarchicalMachine.prefix_path
to resolve global state names since the HSM stack is not reliable whenqueued=True
(thanks @jankrejci). - ๐ Bug #548:
HSM
source states were exited even though they are parents of the destination state (thanks @wes-public-apps).
- Feature #545: The literal 'self' (default model parameter of
-
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 toHierarchicalMachine._process
. This prevents queued transitions from losing their scope. - ๐ Feature #533:
(A)Graph.draw
function (object returned byGraphMachine.get_graph()
) can be passed a file/stream object as first parameter orNone
. The later will result indraw
returning a binary string. (thanks @Blindfreddy). - ๐ Feature #532: Use id(model) instead of model for machine-bound caches in
LockedMachine
,AsyncMachine
andGraphMachine
. This might influence pickling (thanks @thedrow).
- ๐ Bugfix #544:
-
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 whenremove_models
is called (thanks @Plazas87) - ๐ Feature #517: Introduce
try/except
for finalize callbacks inMachine
andHierachicalMachine
. 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 supportsState
andEnum
as arguments (thanks @luup2k) - ๐ Feature #506:
NestedState
andHierachicalMachine.add_states
now accept (lists of) states and enums asinitial
parameter
- ๐ Bugfix #526:
-
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 usestates
as a keyword to define substates. Ifchildren
andstates
are present, onlychildren
will be considered. - Feature #500:
HierarchicalMachine
with custom separator now addsis_state
partials for nested states (e.g.is_C.s3.a()
) to models (thanks @alterscape) - ๐ Bugfix #512: Use
model_attribute
consistently inAsyncMachine
(thanks @thedrow) - โ Testing now treats most warnings as errors (thanks @thedrow)
- As a consequence,
pygraphviz.Agraph
indiagrams_pygraphviz
are now copied bytransitions
sinceAGraph.copy
as of version1.6
does not close temporary files appropriately HierarchicalMachine
now checks whetherstate_cls
,event_cls
andtransition_cls
have been subclassed from nested base classes (e.g.NestedState
) to prevent hard to debug inheritance errors
- ๐ง State configuration dictionaries passed to
-
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 aValueError
when anEnum
name contains the currently usedNestedState.separator
.- ๐ Bugfix #486: Reset
NestedState._scope
when enter/exit callbacks raise an exception (thanks @m986883511) - Bugfix #488: Let
HierarchicalMachine._get_trigger
which is bound tomodel.trigger
raise aMachineError
for invalid events andAttributeError
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 whenqueued='model'
(thanks @jekel) - ๐ Feature #490:
Machine.remove_model
will now also remove model events from the event queue whenqueued=True
- ๐ Feature #491:
Machine.get_transitions
and its HSM counterpart now acceptEnum
andState
forsource
anddest
(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 beasync
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 preventtransitions
to cancel certain tasks. - Feature: Constructor of
HierarchicalMachine
now accepts substates ('A_1_c') and parallel states (['A', 'B']) asinitial
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 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_substates
did not consider enum states - ๐ Feature: Nested enums can now be passed in a dict as
children
withinitial
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
andafter/after_state_change
inAsyncMachine
(thanks @tzoiker and @vishes-shell) - Bugfix #470:
Graph.get_graph()
did not considerenum
states whenshow_roi=True
(thank @termim)
- Feature #473: Assign