15
0

16 Commits

Author SHA256 Message Date
854131f7fd - Switch to pyproject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=28
2025-06-04 06:21:57 +00:00
61386ca885 Enable sle15_python_module_pythons (align with pygraphviz)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=26
2025-04-16 07:59:26 +00:00
b26fecf17c - Update to 0.9.2
* Bug #610: Decorate models appropriately when `HierarchicalMachine`
    is passed to `add_state` (thanks @e0lithic)
  * Bug #647: Let `may_<trigger>` check all parallel states in processing
    order (thanks @spearsear)
  * Bug: `HSM.is_state` works with parallel states now
  * Experimental features:
    + Add `model_override` to Machine constructor to determine the mode of
      operation. With `model_override=Fale` (default), `transitions` will
      not override already defined methods on a model just as it did before.
      For workflows relying on typing, `model_override=True` will override
      methods already defined on the model and only those (!). This allows
      to control which convenience methods shall be assigned to the model
      and keeps the statically 'assumed' model in sync with its runtime
      counterpart. Since defining each and every method manually is rather
      tiresome, `transitions.experimental.utils.generate_base_model`
      features a way to convert a machine configuration into a `BaseClass`
      with all convenience functions and callbacks.
    + Add `transitions.experimental.utils.{add_transitions, event,
      with_model_definitions, transition}` to define trigger methods in a
      class model for more      convenient type checking. `add_transitions`
      can be used as a function decorator and is stackable. `event` returns
      a placeholder object for attribute assigment. `add_transitions` and
      `event` have the same signature and support transition definition like
      machine constructors. The function `transition` can used for better
      typing and returns a dictionary that can be passed to the utility
      functions but also to a machine constructor. `add_transitions` and
      `event` require a machine decorated with `with_model_definitions`.
      Decorating a machine `with_model_definitions` implies `model_override=True`.
  * Feature: Add `may_trigger` to models to check whether transitions can

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=24
2025-04-03 15:55:47 +00:00
26202cfd11 Accepting request 1177699 from home:mcalabkova:branches:devel:languages:python
- update to 0.9.1
  * several bugfixes
  * typing improvements
  * introduces `on_final` callbacks on machines (as well as 
    `NestedState`) and `final` flags for states
  * see the full list in Changelog.md
- Add remove-py2-crumbs.patch to get rid of most py2 remnants
- Add iteritems.patch to clean the rest of six

OBS-URL: https://build.opensuse.org/request/show/1177699
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=22
2024-05-31 21:48:03 +00:00
f23172b0be - update to 0.9.0:
* removed legacy implementation of `HierarchicalMachine` from
    the package
  * Bug #551: Fix active state styling in `GraphMachine` (thanks
    @betaboon)
  * Bug #554: Fix issues related to scopes and queueing in
    `HierachicalMachine` (thanks @jankrejci)
  * Bug #568: Reflexive transitions (dest: '=') had not been
    resolved correctly when source was a wildcard (thanks @jnu)
  * Bug #568: HSM did not detect reflexive transitions if src was
    a parent state (thanks @lostcontrol)
  * Bug #569: Fix implicit fallback to `graphviz` when
    `pygraphviz` was not installed (thanks @FridjofAmundsen)
  * Bug #580: Fix `on_timeout` callback resolution when timeout
    had been initialized with `timeout=0` (thanks @Rysbai)
  * Bug #582: Last label in `GraphSupport` was not correctly
    aligned when `show_attributes=True` (thanks @spagh-eddie)
  * Feature: Add pyi stub files for better type hinting. Since
    many functions and constructors allow rather arbitrary
    arguments time will tell whether typing should be strict (and
    cause more mypy issues) or more relaxed (and thus less
    precise).
  * Feature: Reviewed and improved method documentation
  * Feature #549: Add `may` transition check to transitions
    (thanks @artofhuman)
  * Feature #552: Refactored error handling to be able to handle
    `MachineError` in `on_exception` callbacks (thanks @kpihus)
  * Feature: Add `mypy` to test workflow
  * PR #461: Add `Retry` state to supported state stereotypes
    (thanks @rgov)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=20
2024-01-12 08:27:19 +00:00
0523109636 Accepting request 945691 from home:bnavigator:branches:devel:languages:python
- Add support for Python 3.10
  * transitions-fixpy310.patch -- gh#pytransitions/transitions#559
- Make sure the graphviz tests don't error out without an installed
  font
- Clean obsolete python36 conditionals

OBS-URL: https://build.opensuse.org/request/show/945691
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=19
2022-01-13 12:41:18 +00:00
ff4976a970 Accepting request 927204 from home:bnavigator:branches:devel:languages:python
- Update to version 0.8.10
  * Feature #545: The literal 'self' (default model parameter of
    Machine) has been replaced by the class variable
    Machine.self_literal = 'self'. Machine now performs an identity
    check (instead of a value check) with mod is self.self_literal
    to determine whether it should act as a model. While 'self'
    should still work when passed to the model parameter, we
    encourage using Machine.self_literal from now on. This was done
    to enable easier override of Machine.__eq__ in subclasses
    (thanks @VKSolovev).
  * Bug #547: Introduce HierarchicalMachine.prefix_path to resolve
    global state names since the HSM stack is not reliable when
    queued=True (thanks @jankrejci).
  * Bug #548: HSM source states were exited even though they are
    parents of the destination state (thanks @wes-public-apps).
- Don't test optional extra graphviz on python36: pygraphviz
  dropped Python 3.6 support

OBS-URL: https://build.opensuse.org/request/show/927204
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=18
2021-10-25 19:43:10 +00:00
c01b593ba2 Accepting request 915808 from home:mnhauke:network:automation
- Update to version 0.8.9
  Bugfix
  * NestedEvent now wraps the machine's scope into partials passed
    to HierarchicalMachine._process. This prevents queued
    transitions from losing their scope.
  Feature
  * (A)Graph.draw function (object returned by
    GraphMachine.get_graph()) can be passed a file/stream object
    as first parameter or None. The later will result in draw
    returning a binary string. (thanks @Blindfreddy).
  * Use id(model) instead of model for machine-bound caches in
    LockedMachine, AsyncMachine and GraphMachine. This might
    influence pickling.

OBS-URL: https://build.opensuse.org/request/show/915808
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=17
2021-10-16 09:38:54 +00:00
fc1468e6ac Accepting request 883668 from home:mnhauke:network:automation
- Update to version 0.8.8
  Bugfix
  * AsyncMachine does not remove models when remove_models is
    called.
  Feature
  * Introduce try/except for finalize callbacks in Machine and
    HierachicalMachine. Thus, errors occurring in finalize
    callbacks will be suppressed and only the original error will
    be raised.
  * Show references in graphs and markup. Introduce
    MarkupMachine.format_references to tweak reference formatting.
  * Introduce Machine.on_exception to handle raised exceptions in
    callbacks.
  * Machine.get_triggers now supports State and Enum as arguments.
  * NestedState and HierachicalMachine.add_states now accept
    (lists of) states and enums as initial parameter.
- Update to version 0.8.7
  * State configuration dictionaries passed to HierarchicalMachine
    can also use states as a keyword to define substates. If
    children and states are present, only children will be
    considered.
  * HierarchicalMachine with custom separator now adds
    is_state partials for nested states (e.g. is_C.s3.a()) to
    models.
  * Use model_attribute consistently in AsyncMachine.
  * HierarchicalMachine now checks whether state_cls, event_cls
    and transition_cls have been subclassed from nested base
    classes (e.g. NestedState) to prevent hard to debug
    inheritance errors
- Update to version 0.8.6

OBS-URL: https://build.opensuse.org/request/show/883668
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=15
2021-04-07 20:04:58 +00:00
Tomáš Chvátal
adf242bbc9 Accepting request 828929 from home:mcalabkova:branches:devel:languages:python
- Use recent pytest

OBS-URL: https://build.opensuse.org/request/show/828929
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=13
2020-08-24 16:32:25 +00:00
Tomáš Chvátal
3001d5a313 Accepting request 817500 from home:mnhauke:network:automation
- Update to version 0.8.2
  * Improved testing without any optional graphviz package
  * _check_event_result failed when model was in parallel state
  * Only allow explicit dest=None in Machine.add_transition (not
    just falsy) for internal transitions
  * Fix state creation of nested enums
  * HierarchicalGraphMachine did not find/apply styling for
    parallel states
  * Bugfix: Model.trigger now considers the machine's and current
    state's ignore_invalid_triggers attribute and can be called
    with non-existing events
  * Child states may not have been exited when the executed
    transition had been defined on a parent
  * Introduced transitions.extensions.asyncio.AsyncTimeout as a
    state decorator to avoid threads used
    in transitions.extensions.state.Timeout
  * Use sets instead of lists to cache already covered transitions
    in nested state machines
  * Improve handling of unresolved attributes for easier inheritance
  * Refactored AsyncMachine to enable trio/anyio override

OBS-URL: https://build.opensuse.org/request/show/817500
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=11
2020-06-28 11:03:20 +00:00
79b9a8a70e - remove pep8 unit tests, those are not useful to execute and
fail

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=9
2020-06-09 07:44:56 +00:00
Tomáš Chvátal
6cf6c35613 Accepting request 791100 from home:mnhauke:network:automation
- Update to versino 0.8.1
  * Feature: Introduced experimental HierarchicalAsync(Graph)Machine
  * Feature #405: Support for nested Enums in HierarchicalMachine
  * Bugfix #400: Fix style initialization when initial state is an Enum
  * Bugfix #403: AsyncMachine.dispatch now returns a boolean asexpected
  * Bugfix #413: Improve diagram output for HierarchicalMachine
  * Increased coverage
  * Introduced xdist for parallel testing with pytest

OBS-URL: https://build.opensuse.org/request/show/791100
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=7
2020-04-03 06:50:01 +00:00
Tomáš Chvátal
51fe992611 Accepting request 788238 from home:pgajdos:python
- version update to 0.8.0
  - Feature: `HierarchicalMachine` has been rewritten to support parallel states. Please have a look at the ReadMe.md to check what has changed.
    + The previous version can be found in `transitions.extensions.nesting_legacy` for now
  - Feature: Introduced `AsyncMachine` (see discussion #259); note that async HSMs are not yet supported
  - Feature #390: String callbacks can now point to properties and attributes (thanks @jsenecal)
  - Bugfix: Auto transitions are added multiple times when add_states is called more than once
  - Bugfix: Convert state._name from `Enum` into strings in `MarkupMachine` when necessary
  - Bugfix #392: Allow `Machine.add_ordered_transitions` to be called without the initial state (thanks @mkaranki and @facundofc)
  - `GraphMachine` now attempts to fall back to `graphviz` when importing `pygraphviz` fails
  - Not implemented/tested so far (contributions are welcome!):
    + Proper Graphviz support of parallel states
    + AsyncHierachicalMachine

OBS-URL: https://build.opensuse.org/request/show/788238
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=5
2020-03-25 15:12:19 +00:00
Tomáš Chvátal
dbfe51520d Accepting request 762909 from home:mnhauke:network:automation
- Update to version 0.7.2
  * Fix transitions for enums with str behavior
  * Don't mask away KeyError when executing a transition
  * Add support for dynamic model state attribute

OBS-URL: https://build.opensuse.org/request/show/762909
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=3
2020-01-13 08:39:52 +00:00
Tomáš Chvátal
8ea71ce5f1 Accepting request 734151 from home:mnhauke
Initial package for python-transitions

OBS-URL: https://build.opensuse.org/request/show/734151
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-transitions?expand=0&rev=1
2019-10-01 08:22:02 +00:00