radix/effect — pull request #12 by radix (2014-12-22 07:57:13+00:00)
Title: Composable intent dispatching

This is a big change. The driving idea is to make dispatchers composable, and to discourage tight coupling between intents and their performers. It should now be very easy for an application to match up intents and performers between third-party libraries and its own application code.

- perform() and resolve_stubs now require a dispatcher as the first argument.
- perform_effect methods on intent objects are now deprecated (though there is an effect.twisted.legacy_dispatcher that still implements support)
- there are new classes "TypeDispatcher" and "ComposedDispatcher" that let you define dispatchers in a composable way
- sync_performer and deferred_performer decorators were added (actually, reintroduced) for making it easy to write performers.
- effect.base_dispatcher is a dispatcher that supports the "standard" intents, like Constant, Func, and Error.
- a new effect.twisted.make_twisted_dispatcher(reactor) function returns a dispatcher that supports ParallelEffects and Delay.
- also a bunch of misc doc improvements
- all of the code was moved into submodules of effect, so effect/__init__.py just imports things to promote them to the top-level namespace.