Skip to content

0.0.26

Compare
Choose a tag to compare
@pomponchik pomponchik released this 04 Aug 21:42
· 92 commits to main since this release
fcba83c

An important update dedicated to internal optimizations. The token interfaces have not changed in any way.

  • Each token now caches information that one of the tokens embedded in it has been canceled. When the token status is requested again, it will not bypass the graph, but will immediately return the result.
  • Added an optimization of the token summation operation: now, if you add a SimpleToken() object that has not been saved to any variable to any another token, this object will be ignored. Thus, the token tree becomes smaller. That is, the operation SimpleToken() + TimeoutToken(5) now gives the result SimpleToken(TimeoutToken(5)), not SimpleToken(SimpleToken(), TimeoutToken(5)) like before. In addition, this leads to the fact that the sums of more than 3 tokens become "flat".
  • Fixed a bug where you could set the cancelled attribute of a token whose nested token was canceled to False.
  • Added the __slots__ attribute to the cancellation report object. This allowed you to save an extra 8 bytes on each such object, provided that you have Python 3.10 or later.
  • Type hints slightly improved. The file structure of the project is now more extensive. The package metadata was slightly expanded.