Skip to content

Commit b60be26

Browse files
committed
docs: note validators dict/JSON fix in 3.2.0 release notes
Signed-off-by: Fernando Macedo <fgmacedo@gmail.com>
1 parent 7e8d886 commit b60be26

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/releases/3.2.0.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,20 @@ The engine now skips self-cancellation when the invocation's task is the current
172172
running task, letting the originating handler complete normally.
173173

174174
[#627](https://github.com/fgmacedo/python-statemachine/pull/627).
175+
176+
### `validators` in a dict/JSON transition definition are no longer dropped
177+
178+
`create_machine_class_from_definition` (the dict/JSON adapter behind
179+
{func}`statemachine.io.load`) threaded `cond`, `unless`, `on`, `before` and
180+
`after` from each transition definition into the `Transition`, but not
181+
`validators`. A `validators` entry was silently ignored, so it never ran at
182+
`send()`, leaving dict/JSON-defined machines without the explicit-rejection
183+
channel (raise to abort with a reason) that `validators` provides. The
184+
`TransitionDict` type also mistyped `validators` as `bool`.
185+
186+
`validators` is now materialized onto the `Transition` like the other callback
187+
specs, and the type was corrected to the same callback-spec union as
188+
`cond`/`unless`.
189+
190+
[#628](https://github.com/fgmacedo/python-statemachine/issues/628),
191+
[#629](https://github.com/fgmacedo/python-statemachine/pull/629).

0 commit comments

Comments
 (0)