From 741512e89b15f842afa89a756de8c831043a8851 Mon Sep 17 00:00:00 2001 From: Fernando Macedo Date: Fri, 6 Oct 2023 12:11:02 -0300 Subject: [PATCH 1/3] chore: 2.1.2 release notes --- docs/releases/2.1.2.md | 14 ++++++++++++++ docs/releases/index.md | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/releases/2.1.2.md diff --git a/docs/releases/2.1.2.md b/docs/releases/2.1.2.md new file mode 100644 index 00000000..977fe611 --- /dev/null +++ b/docs/releases/2.1.2.md @@ -0,0 +1,14 @@ +# StateMachine 2.1.2 + +*October 6, 2023* + +This release improves the setup performance of the library by a 10x factor, with a major +refactoring on how we handle the callbacks registry and validations. + +See [#401](https://github.com/fgmacedo/python-statemachine/issues/401) for the technical details. + + +## Bugfixes in 2.1.2 + +- Fixes [#406](https://github.com/fgmacedo/python-statemachine/issues/406) action callback being + called twice when mixing decorator syntax combined with the naming convention. diff --git a/docs/releases/index.md b/docs/releases/index.md index 2dba15ba..57a7c5e4 100644 --- a/docs/releases/index.md +++ b/docs/releases/index.md @@ -13,8 +13,9 @@ Below are release notes through StateMachine and its patch releases. ### 2.0 releases ```{toctree} -:maxdepth: 1 +:maxdepth: 2 +2.1.2 2.1.1 2.1.0 2.0.0 From fbd1484deb6262b0b30a3794f3ad22c999f8b14e Mon Sep 17 00:00:00 2001 From: Fernando Macedo Date: Fri, 6 Oct 2023 12:12:12 -0300 Subject: [PATCH 2/3] bump version to 2.1.2 --- pyproject.toml | 2 +- statemachine/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 857400c3..1ca00d28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-statemachine" -version = "2.1.1" +version = "2.1.2" description = "Python Finite State Machines made easy." authors = ["Fernando Macedo "] maintainers = [ diff --git a/statemachine/__init__.py b/statemachine/__init__.py index c4d57f75..e7cfb395 100644 --- a/statemachine/__init__.py +++ b/statemachine/__init__.py @@ -3,6 +3,6 @@ __author__ = """Fernando Macedo""" __email__ = "fgmacedo@gmail.com" -__version__ = "2.1.1" +__version__ = "2.1.2" __all__ = ["StateMachine", "State"] From 2d9b25941a567bec24a074494d2f4017e5a13ecf Mon Sep 17 00:00:00 2001 From: Fernando Macedo Date: Fri, 6 Oct 2023 12:45:37 -0300 Subject: [PATCH 3/3] chore: Adding note about support for python 3.12 --- docs/actions.md | 2 +- docs/releases/2.1.2.md | 6 ++++++ poetry.lock | 4 ++-- pyproject.toml | 5 +++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/actions.md b/docs/actions.md index b022d2ee..e81d6f04 100644 --- a/docs/actions.md +++ b/docs/actions.md @@ -87,7 +87,7 @@ All actions and {ref}`guards` support multiple method signatures. They follow th For each defined {ref}`state`, you can declare `enter` and `exit` callbacks. -### Declare state actions by naming convention +### Bind state actions by naming convention Callbacks by naming convention will be searched on the StateMachine and on the model, using the patterns: diff --git a/docs/releases/2.1.2.md b/docs/releases/2.1.2.md index 977fe611..bc474843 100644 --- a/docs/releases/2.1.2.md +++ b/docs/releases/2.1.2.md @@ -8,6 +8,12 @@ refactoring on how we handle the callbacks registry and validations. See [#401](https://github.com/fgmacedo/python-statemachine/issues/401) for the technical details. +## Python compatibility 2.1.2 + +StateMachine 2.1.2 supports Python 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12. + +On the next major release (3.0.0), we will drop support for Python 3.7. + ## Bugfixes in 2.1.2 - Fixes [#406](https://github.com/fgmacedo/python-statemachine/issues/406) action callback being diff --git a/poetry.lock b/poetry.lock index 74305e53..24360db4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1565,5 +1565,5 @@ diagrams = [] [metadata] lock-version = "2.0" -python-versions = ">=3.7, <3.12" -content-hash = "71d9b3f581409c93a609df51df100626bed6c464e11628ddcd4f93574c5f8029" +python-versions = ">=3.7, <3.13" +content-hash = "6e801ad1dfdd7a3473d537bdf9061873889027a1ab2731fe4f96e2bafe13912e" diff --git a/pyproject.toml b/pyproject.toml index 1ca00d28..3ea6499f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development :: Libraries" ] @@ -33,7 +34,7 @@ classifiers = [ diagrams = ["pydot"] [tool.poetry.dependencies] -python = ">=3.7, <3.12" +python = ">=3.7, <3.13" [tool.poetry.group.dev.dependencies] pytest = "^7.2.0" @@ -66,7 +67,7 @@ addopts = "--ignore=docs/conf.py --ignore=docs/auto_examples/ --ignore=docs/_bui doctest_optionflags = "ELLIPSIS IGNORE_EXCEPTION_DETAIL NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL" [tool.mypy] -python_version = "3.11" +python_version = "3.12" warn_return_any = true warn_unused_configs = true disable_error_code = "annotation-unchecked"