Skip to content

Commit 847f1d5

Browse files
committed
Merge branch 'release/3.1.0' into develop
2 parents 5780184 + 586f8bc commit 847f1d5

5 files changed

Lines changed: 237 additions & 115 deletions

File tree

docs/releases/3.1.0.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# StateChart 3.1.0
22

3-
*Not released yet*
3+
*May 15, 2026*
44

55
## What's new in 3.1.0
66

@@ -205,3 +205,21 @@ fixes [#610](https://github.com/fgmacedo/python-statemachine/issues/610).
205205
fixes [#606](https://github.com/fgmacedo/python-statemachine/issues/606).
206206

207207
## Misc in 3.1.0
208+
209+
- Internal refactor of `Configuration` to always normalize to `OrderedSet` internally, with
210+
two boundary helpers (`_read_from_model` / `_write_to_model`) confining the
211+
`None | scalar | OrderedSet` trichotomy to the model edge. Public API is unchanged.
212+
[#599](https://github.com/fgmacedo/python-statemachine/pull/599).
213+
214+
- Reduced allocation overhead in `Configuration.add()` / `discard()` by mutating the
215+
`OrderedSet` in place and writing back via the setter, removing the ~4–5% overhead
216+
introduced by the persistence fix in [#596](https://github.com/fgmacedo/python-statemachine/pull/596).
217+
218+
- Diagram module restructured into a package and doctests in `docs/diagram.md` replaced by
219+
the new Sphinx directive; a pre-commit hook now keeps generated diagrams in sync.
220+
[#589](https://github.com/fgmacedo/python-statemachine/pull/589),
221+
[#590](https://github.com/fgmacedo/python-statemachine/pull/590).
222+
223+
- Bumped the minimum `pydot` version to `4.0.1` for the `diagrams` optional extra, plus a
224+
general refresh of dev dependencies (ruff, pytest-cov, pytest-asyncio, Django, furo, etc.).
225+
[#608](https://github.com/fgmacedo/python-statemachine/pull/608).

statemachine/locale/en/LC_MESSAGES/statemachine.po

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#
44
msgid ""
55
msgstr ""
6-
"Project-Id-Version: 3.0.0\n"
6+
"Project-Id-Version: 3.1.0\n"
77
"Report-Msgid-Bugs-To: fgmacedo@gmail.com\n"
8-
"POT-Creation-Date: 2026-02-24 14:31-0300\n"
8+
"POT-Creation-Date: 2026-05-15 12:08-0300\n"
99
"PO-Revision-Date: 2026-02-24 14:31-0300\n"
1010
"Last-Translator: Fernando Macedo <fgmacedo@gmail.com>\n"
1111
"Language: en\n"
@@ -14,113 +14,139 @@ msgstr ""
1414
"MIME-Version: 1.0\n"
1515
"Content-Type: text/plain; charset=utf-8\n"
1616
"Content-Transfer-Encoding: 8bit\n"
17-
"Generated-By: Babel 2.16.0\n"
17+
"Generated-By: Babel 2.18.0\n"
1818

1919
#: statemachine/callbacks.py:404 statemachine/callbacks.py:409
20+
#, python-brace-format
2021
msgid "Did not found name '{}' from model or statemachine"
2122
msgstr "Did not found name '{}' from model or statemachine"
2223

24+
#: statemachine/configuration.py:121
25+
msgid ""
26+
"There's no current state set. In async code, did you activate the initial"
27+
" state? (e.g., `await sm.activate_initial_state()`)"
28+
msgstr ""
29+
"There's no current state set. In async code, did you activate the initial"
30+
" state? (e.g., `await sm.activate_initial_state()`)"
31+
2332
#: statemachine/dispatcher.py:126
33+
#, python-brace-format
2434
msgid "Failed to parse boolean expression '{}'"
2535
msgstr "Failed to parse boolean expression '{}'"
2636

27-
#: statemachine/event.py:121
37+
#: statemachine/event.py:95
38+
#, python-brace-format
39+
msgid ""
40+
"Event() received a non-string 'id' ({cls_name}). To combine multiple "
41+
"transitions under one event, use the | operator: t1 | t2."
42+
msgstr ""
43+
"Event() received a non-string 'id' ({cls_name}). To combine multiple "
44+
"transitions under one event, use the | operator: t1 | t2."
45+
46+
#: statemachine/event.py:131
47+
#, python-brace-format
2848
msgid "Cannot add callback '{}' to an event with no transitions."
2949
msgstr "Cannot add callback '{}' to an event with no transitions."
3050

31-
#: statemachine/event.py:154
51+
#: statemachine/event.py:164
52+
#, python-brace-format
3253
msgid "Event {} cannot be called without a SM instance"
3354
msgstr "Event {} cannot be called without a SM instance"
3455

3556
#: statemachine/exceptions.py:25
57+
#, python-brace-format
3658
msgid "{!r} is not a valid state value."
3759
msgstr "{!r} is not a valid state value."
3860

3961
#: statemachine/exceptions.py:40
62+
#, python-brace-format
4063
msgid "Can't {} when in {}."
4164
msgstr "Can't {} when in {}."
4265

43-
#: statemachine/factory.py:79
66+
#: statemachine/factory.py:81
67+
#, python-brace-format
4468
msgid ""
4569
"There should be one and only one initial state. Your currently have "
4670
"these: {0}"
4771
msgstr ""
4872
"There should be one and only one initial state. Your currently have "
4973
"these: {0}"
5074

51-
#: statemachine/factory.py:160
75+
#: statemachine/factory.py:198
76+
#, python-brace-format
5277
msgid ""
5378
"There should be one and only one initial state. You currently have these:"
5479
" {!r}"
5580
msgstr ""
5681
"There should be one and only one initial state. You currently have these:"
5782
" {!r}"
5883

59-
#: statemachine/factory.py:176
84+
#: statemachine/factory.py:213
85+
#, python-brace-format
6086
msgid "Cannot declare transitions from final state. Invalid state(s): {}"
6187
msgstr "Cannot declare transitions from final state. Invalid state(s): {}"
6288

63-
#: statemachine/factory.py:187
89+
#: statemachine/factory.py:225
90+
#, python-brace-format
6491
msgid ""
6592
"All non-final states should have at least one outgoing transition. These "
6693
"states have no outgoing transition: {!r}"
6794
msgstr ""
6895
"All non-final states should have at least one outgoing transition. These "
6996
"states have no outgoing transition: {!r}"
7097

71-
#: statemachine/factory.py:201
98+
#: statemachine/factory.py:239
99+
#, python-brace-format
72100
msgid ""
73101
"All non-final states should have at least one path to a final state. "
74102
"These states have no path to a final state: {!r}"
75103
msgstr ""
76104
"All non-final states should have at least one path to a final state. "
77105
"These states have no path to a final state: {!r}"
78106

79-
#: statemachine/factory.py:214
107+
#: statemachine/factory.py:252
108+
#, python-brace-format
80109
msgid ""
81110
"There are unreachable states. The statemachine graph should have a single"
82111
" component. Disconnected states: {}"
83112
msgstr ""
84113
"There are unreachable states. The statemachine graph should have a single"
85114
" component. Disconnected states: {}"
86115

87-
#: statemachine/factory.py:251
116+
#: statemachine/factory.py:289
117+
#, python-brace-format
88118
msgid ""
89119
"Invalid entry in 'listeners': {!r}. Expected a class, callable, or "
90120
"listener instance."
91121
msgstr ""
92122
"Invalid entry in 'listeners': {!r}. Expected a class, callable, or "
93123
"listener instance."
94124

95-
#: statemachine/factory.py:351
125+
#: statemachine/factory.py:388
126+
#, python-brace-format
96127
msgid "An event in the '{}' has no id."
97128
msgstr "An event in the '{}' has no id."
98129

99130
#: statemachine/mixins.py:28
131+
#, python-brace-format
100132
msgid "{!r} is not a valid state machine name."
101133
msgstr "{!r} is not a valid state machine name."
102134

103-
#: statemachine/state.py:246
135+
#: statemachine/state.py:250
104136
msgid "'donedata' can only be specified on final states."
105137
msgstr "'donedata' can only be specified on final states."
106138

107-
#: statemachine/state.py:304
108-
msgid "State overriding is not allowed. Trying to add '{}' to {}"
109-
msgstr "State overriding is not allowed. Trying to add '{}' to {}"
110-
111-
#: statemachine/statemachine.py:158
139+
#: statemachine/statemachine.py:169
112140
msgid "There are no states or transitions."
113141
msgstr "There are no states or transitions."
114142

115-
#: statemachine/statemachine.py:431
116-
msgid ""
117-
"There's no current state set. In async code, did you activate the initial"
118-
" state? (e.g., `await sm.activate_initial_state()`)"
119-
msgstr ""
120-
"There's no current state set. In async code, did you activate the initial"
121-
" state? (e.g., `await sm.activate_initial_state()`)"
143+
#: statemachine/statemachine.py:239
144+
#, python-brace-format
145+
msgid "State overriding is not allowed. Trying to add '{}' to {}"
146+
msgstr "State overriding is not allowed. Trying to add '{}' to {}"
122147

123-
#: statemachine/transition.py:74
148+
#: statemachine/transition.py:75
149+
#, python-brace-format
124150
msgid ""
125151
"Not a valid internal transition from source {source!r}, target {target!r}"
126152
" should be self or a descendant."
@@ -129,5 +155,6 @@ msgstr ""
129155
" should be self or a descendant."
130156

131157
#: statemachine/transition_mixin.py:19
158+
#, python-brace-format
132159
msgid "{} only supports the decorator syntax to register callbacks."
133160
msgstr "{} only supports the decorator syntax to register callbacks."

0 commit comments

Comments
 (0)