python-statemachine 2.3.4__py3-none-any.whl → 2.3.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_statemachine-2.3.4.dist-info → python_statemachine-2.3.6.dist-info}/METADATA +3 -1
- {python_statemachine-2.3.4.dist-info → python_statemachine-2.3.6.dist-info}/RECORD +10 -9
- statemachine/__init__.py +1 -1
- statemachine/contrib/diagram.py +6 -6
- statemachine/engines/async_.py +1 -0
- statemachine/engines/sync.py +1 -0
- statemachine/py.typed +0 -0
- statemachine/statemachine.py +5 -4
- {python_statemachine-2.3.4.dist-info → python_statemachine-2.3.6.dist-info}/LICENSE +0 -0
- {python_statemachine-2.3.4.dist-info → python_statemachine-2.3.6.dist-info}/WHEEL +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-statemachine
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.6
|
|
4
4
|
Summary: Python Finite State Machines made easy.
|
|
5
5
|
Home-page: https://github.com/fgmacedo/python-statemachine
|
|
6
6
|
License: MIT
|
|
@@ -20,8 +20,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
24
|
Classifier: Topic :: Software Development :: Libraries
|
|
24
25
|
Provides-Extra: diagrams
|
|
26
|
+
Requires-Dist: pydot (>=2.0.0) ; extra == "diagrams"
|
|
25
27
|
Description-Content-Type: text/markdown
|
|
26
28
|
|
|
27
29
|
# Python StateMachine
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
statemachine/__init__.py,sha256=
|
|
1
|
+
statemachine/__init__.py,sha256=_tQlx-C4SHRysuQwRTIU3c9C8MJrDlvIVCG0kfuWFBk,192
|
|
2
2
|
statemachine/callbacks.py,sha256=5_WaILrjUvZOYX_LQe4Gd8nsCvkErjw9DaHYG_ggvxs,11101
|
|
3
3
|
statemachine/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
statemachine/contrib/diagram.py,sha256=
|
|
4
|
+
statemachine/contrib/diagram.py,sha256=eK3unncEXNq3e_yfBTZmvgdWWWDZq69r7gsHvCHr5Ys,7208
|
|
5
5
|
statemachine/dispatcher.py,sha256=2DtjCj_kiDF2uk_EEvXxs5NTABOvCr4paxVz77s6mXA,5365
|
|
6
6
|
statemachine/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
statemachine/engines/async_.py,sha256=
|
|
8
|
-
statemachine/engines/sync.py,sha256=
|
|
7
|
+
statemachine/engines/async_.py,sha256=deZ5oYeoIYX9zOsFEOCT4KXsz5V1F9fbaMDOBATnTkE,5572
|
|
8
|
+
statemachine/engines/sync.py,sha256=cGy23Ivx0Ul4NWSix8E8PNA1Ji4V9qvOd3K_yodD_UI,5523
|
|
9
9
|
statemachine/event.py,sha256=LfvO-imBVyVX6krBK0Pz7q-iTRudo_5OjTFaYJpc6IQ,1556
|
|
10
10
|
statemachine/event_data.py,sha256=x9m9Q2q-78kVFnJVJmOAwq6lo9zgSVxko3q4Omwjqxk,2228
|
|
11
11
|
statemachine/events.py,sha256=QgXcxu25WkUaxJvonh0K7hOlYYSQlV0jbhTCAi_gpwc,736
|
|
@@ -17,15 +17,16 @@ statemachine/locale/en/LC_MESSAGES/statemachine.po,sha256=zJYaV2DxrHdPngDOt1bji8
|
|
|
17
17
|
statemachine/locale/pt_BR/LC_MESSAGES/statemachine.po,sha256=SPrt-KaCBCKQq7PoOMtyyqU1bihrw_3MPL_NbqZzTVs,3214
|
|
18
18
|
statemachine/mixins.py,sha256=Y1fa52Cj20JaGkyNk3P7Gpqkt4cGTjJ0YyV_VQyCl0M,1231
|
|
19
19
|
statemachine/model.py,sha256=OylI3FjMiHpYyDl9mtK1zEJMeSvemaN4giQDonpc8kI,211
|
|
20
|
+
statemachine/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
21
|
statemachine/registry.py,sha256=HmV9sUGkYVrNUZxJYoZo-trSUis7dIun_WcGktblgc8,922
|
|
21
22
|
statemachine/signature.py,sha256=HwuyWX3p_GZwKKrGbt9wk4-bHpymqs_pgqW7OlDgGRc,7877
|
|
22
23
|
statemachine/state.py,sha256=IKdkMBkXCgcvswMKQZ-hn0-739Hhf6z6q8mSEoevV7o,8262
|
|
23
|
-
statemachine/statemachine.py,sha256=
|
|
24
|
+
statemachine/statemachine.py,sha256=IvvQ9NKQAdfMXD5xc7Henvy3YrLd5vjN1APG-WnhmlM,11574
|
|
24
25
|
statemachine/states.py,sha256=vpRNjiGmTDHvE0fn0gwdq8-WcG32n4ZiPTU-kgZ73rc,4870
|
|
25
26
|
statemachine/transition.py,sha256=R7gfSZjqR59OIdpKePgdr66zTp5azow-tDqqYJsECR4,4711
|
|
26
27
|
statemachine/transition_list.py,sha256=_tdFD1O7hw8xVAU6nRYmGrj6TCAM0SD-Sa0_DYKa88Y,6034
|
|
27
28
|
statemachine/utils.py,sha256=DpcrGqlbrnT-ogh-BogG0L07EG3KirHOsKORHlspDlI,1041
|
|
28
|
-
python_statemachine-2.3.
|
|
29
|
-
python_statemachine-2.3.
|
|
30
|
-
python_statemachine-2.3.
|
|
31
|
-
python_statemachine-2.3.
|
|
29
|
+
python_statemachine-2.3.6.dist-info/LICENSE,sha256=zcP7TsJMqaFxuTvLRZPT7nJl3_ppjxR9Z76BE9pL5zc,1074
|
|
30
|
+
python_statemachine-2.3.6.dist-info/METADATA,sha256=Ozs8cZly2wGdAlvS144fRCe_umkG6lbqGpJHZxgpihc,14036
|
|
31
|
+
python_statemachine-2.3.6.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
32
|
+
python_statemachine-2.3.6.dist-info/RECORD,,
|
statemachine/__init__.py
CHANGED
statemachine/contrib/diagram.py
CHANGED
|
@@ -18,16 +18,16 @@ class DotGraphMachine:
|
|
|
18
18
|
font_name = "Arial"
|
|
19
19
|
"""Graph font face name"""
|
|
20
20
|
|
|
21
|
-
state_font_size = "
|
|
22
|
-
"""State font size"""
|
|
21
|
+
state_font_size = "10"
|
|
22
|
+
"""State font size in points"""
|
|
23
23
|
|
|
24
24
|
state_active_penwidth = 2
|
|
25
25
|
"""Active state external line width"""
|
|
26
26
|
|
|
27
27
|
state_active_fillcolor = "turquoise"
|
|
28
28
|
|
|
29
|
-
transition_font_size = "
|
|
30
|
-
"""Transition font size"""
|
|
29
|
+
transition_font_size = "9"
|
|
30
|
+
"""Transition font size in points"""
|
|
31
31
|
|
|
32
32
|
def __init__(self, machine):
|
|
33
33
|
self.machine = machine
|
|
@@ -48,7 +48,7 @@ class DotGraphMachine:
|
|
|
48
48
|
"i",
|
|
49
49
|
shape="circle",
|
|
50
50
|
style="filled",
|
|
51
|
-
fontsize="
|
|
51
|
+
fontsize="1",
|
|
52
52
|
fixedsize="true",
|
|
53
53
|
width=0.2,
|
|
54
54
|
height=0.2,
|
|
@@ -167,7 +167,7 @@ def quickchart_write_svg(sm: StateMachine, path: str):
|
|
|
167
167
|
>>> print(sm._graph().to_string())
|
|
168
168
|
digraph list {
|
|
169
169
|
fontname=Arial;
|
|
170
|
-
fontsize=
|
|
170
|
+
fontsize=10;
|
|
171
171
|
label=OrderControl;
|
|
172
172
|
rankdir=LR;
|
|
173
173
|
...
|
statemachine/engines/async_.py
CHANGED
statemachine/engines/sync.py
CHANGED
statemachine/py.typed
ADDED
|
File without changes
|
statemachine/statemachine.py
CHANGED
|
@@ -105,13 +105,14 @@ class StateMachine(metaclass=StateMachineMetaclass):
|
|
|
105
105
|
)
|
|
106
106
|
self._put_nonblocking(trigger_data)
|
|
107
107
|
|
|
108
|
-
self._engine =
|
|
108
|
+
self._engine: AsyncEngine | SyncEngine | None = None
|
|
109
|
+
self._select_engine(rtc)
|
|
109
110
|
|
|
110
|
-
def
|
|
111
|
+
def _select_engine(self, rtc: bool):
|
|
111
112
|
if self._callbacks_registry.has_async_callbacks:
|
|
112
|
-
|
|
113
|
+
AsyncEngine(self, rtc=rtc)
|
|
113
114
|
else:
|
|
114
|
-
|
|
115
|
+
SyncEngine(self, rtc=rtc)
|
|
115
116
|
|
|
116
117
|
def activate_initial_state(self):
|
|
117
118
|
result = self._engine.activate_initial_state()
|
|
File without changes
|
|
File without changes
|