Skip to content

Tags: mirror-dump/python-statemachine

Tags

v2.3.4

Toggle v2.3.4's commit message
*July 11, 2024*

- Fixes
  [fgmacedo#465](fgmacedo#465)
regression that caused exception when registering a listener with
unbounded callbacks.

latest

Toggle latest's commit message
Merge tag 'v2.3.4' into develop

*July 11, 2024*

- Fixes
  [fgmacedo#465](fgmacedo#465)
regression that caused exception when registering a listener with
unbounded callbacks.

v2.3.3

Toggle v2.3.3's commit message
*July 3, 2024*

- Fixes
  [fgmacedo#457](fgmacedo#457)
regression that caused backwards incomplatible changes when using Enums.
Thanks [@hperrey](https://github.com/hperrey)!

Deprecations that will be removed on the next major release:

- The `States.from_enum(..., use_enum_instance=True)` will be the
  default.

```{seealso}
See {ref}`States from Enum types` for more details.
```

v2.3.2

Toggle v2.3.2's commit message
*July 01, 2024*

Observers are now rebranded to {ref}`listeners`. With expanted support
for adding listeners when
instantiating a state machine. This allows covering more use cases. We
also improved the async support.

v2.3.1

Toggle v2.3.1's commit message
*June 10, 2024*

- Fixes
  [fgmacedo#443](fgmacedo#443)
regression that caused `RuntimeError` when running SM with threads.
Thanks [@gwidion](https://x.com/gwidion)!

v2.3.0

Toggle v2.3.0's commit message
*June 7, 2024*

This release has a high expected feature, we're adding [asynchronous
support](../async.md), and enhancing overall functionality. In fact, the
approach we took was to go all the way down changing the internals of
the library to be fully async, keeping only the current external API as
a thin sync/async adapter.

StateMachine 2.3.0 supports Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12.

We've fixed a bug on the package declaration that was preventing users
from Python 3.7 to install the latest version.

This release introduces native coroutine support using asyncio, enabling
seamless integration with asynchronous code.

Now you can send and await for events, and also write async
{ref}`Actions`, {ref}`Conditions` and {ref}`Validators`.

```{seealso}
See {ref}`sphx_glr_auto_examples_air_conditioner_machine.py` for an
example of
async code with a state machine.
```

```py
>>> class AsyncStateMachine(StateMachine):
...     initial = State('Initial', initial=True)
...     final = State('Final', final=True)
...
...     advance = initial.to(final)

>>> async def run_sm():
...     sm = AsyncStateMachine()
...     await sm.advance()
...     print(sm.current_state)

>>> asyncio.run(run_sm())
Final

```

v2.2.0

Toggle v2.2.0's commit message
fix: release action needs graphviz to run tests before publising

2.1.1

Toggle 2.1.1's commit message
2.1.1 bugfix release

2.1.0

Toggle 2.1.0's commit message
fix: Trying to fix rtd build