Traits Futures 0.3.0
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
cancelmethod on a future no longer raise aRuntimeErrorexception when a future is not cancellable; instead, it silently does nothing. Code that needs to distinguish can use the new return value of thecancelmethod to determine whether thecancelcall actually caused cancellation to occur. Code that currently checks thecancellableproperty before cancelling should be able to safely drop that check. - The
executor_statetrait of a |TraitsExecutor| is no longer writable. - The
executorandcallableparameters to thesubmit_call,submit_iterationandsubmit_progressfunctions may become positional-only in a future version of Traits Futures. If you're passing arguments by name instead of by position, for example usingsubmit_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.