Changelogs » Miros

PyUp Safety actively tracks 263,329 Python packages for vulnerabilities and notifies you when to upgrade.

Miros

4.1.4

The previous, **v4.1.3**, version of miros ``ThreadSafeAttributes`` class would not protect thread-safe-attributes from race conditions when they were used with the non-atomic ``"+="``, ``"-="`` ... ``"<<="`` family of operations.  (I could not get the broken code to fail in my tests, it was a review that brought the error to my attention; thank you to **Ljubomir Kaludjercic** for pointing this out to me).
  
  To fix this issue, the deque was removed and a threading.Rlock was used with the inspect module, within a descriptor.  Upon access, the descriptor checks to see if the previous line of code contains a ``"+="``, ``"-="``, ... ``"<<="`` and if so it will leave the lock active until the value is set, see [the code here](https://github.com/aleph2c/miros/blob/master/miros/thread_safe_attributes.py).  The usage of this limited protection was explained and documented in the example section of [miros.ca](https://aleph2c.github.io/miros/index.html), you can see it [here](https://aleph2c.github.io/miros/thread_safe_attributes.html).

4.1.3

Added a **ThreadSafeAttributes** class which when inherited from will provide new
  class level syntax for building thread safe attributes.  At the class level you
  would write ``_attributes = ['attr1', 'attr2', 'attr3']`` to produce the thread
  safe attributes, ``attr1``, ``attr2`` and ``attr3``.  (Under the hood these attributes
  are actually properties of a small deque ring buffer of size 1.)  To see more
  about this feature reference the recipes section of the miros project at tag
  v4.1.3 or later.

4.1.2

The Factory class lets a miros user build state machines within a class.  Previous to this release only static methods could be registered to signals during the state construction process.
  
  * static methods are still permitted as catch handler inputs (backwards
  compatible)
  * standard methods are now also permitted as catch handlers too.

4.1.1

* the stop method can now be called from within an ActiveObject or a Factory.

4.1.0

* removed code which hides exceptions within your statechart (this might unmask
  bugs in your design)
  * changed how miros stops active objects.
  * a call to the ActiveObject stop method will not stop the active fabric
  * a call to the ActiveObject stop method will kill all slave threads which
  are posting events into that ActiveObject.
  * after the stop method is called on an ActiveObject, the ActiveFabric will
  not post events into that ActiveObject's input queue, since it won't exist
  anymore.
  * removed unnecessary files from pip package (doc/test...)