Skip to content

Traits Futures 0.3.0

Choose a tag to compare

@mdickinson mdickinson released this 29 Jul 06:48

This is a feature release of Traits Futures, with a some minor backwards incompatible changes that users should be aware of. New features include multiprocessing support, wxPython support, support for delivering events using an asyncio event loop in place of a GUI toolkit event loop, and better support for synchronous executor shutdown.

Migration guide

The majority of existing code using Traits Futures 0.2.0 should continue to work with Traits Futures 0.3.0 with no changes. However, there are some minor changes that could affect current code, and some major backwards-incompatible changes for anyone making use of the ITaskSpecification interface to create their own background task types. For the ITaskSpecification changes, see the detailed changelog in the documentation.

  • The cancel method on a future no longer raise a RuntimeError exception when a future is not cancellable; instead, it silently does nothing. Code that needs to distinguish can use the new return value of the cancel method to determine whether the cancel call actually caused cancellation to occur. Code that currently checks the cancellable property before cancelling should be able to safely drop that check.
  • The executor_state trait of a |TraitsExecutor| is no longer writable.
  • The executor and callable parameters to the submit_call, submit_iteration and submit_progress functions may become positional-only in a future version of Traits Futures. If you're passing arguments by name instead of by position, for example using submit_call(executor=my_executor, callable=do_calculation, ...), you should fix your code to pass by position instead: submit_call(my_executor, do_calculation, ...).

See the changelog in the documentation for a full list of changes.