2.1.0 - 2022-02-07
-
Repeat
andForever
no longer useApplyM
internally. This was non-intuitive, and overall decreased usability. NowRepeat
andForever
always send the same arguments (if any) to their enclosedWire
. -
RepeatM
andForeverM
perform wire repetition with argument passing.
Repeat
called its embedded function with incorrect arguments. This has been fixed.
2.0.0 - 2022-02-06
This release adds a killer feature -- wires can return
values that are passed on to the next wire. To use it,
a wire returns a tuple (newWire, [arg1, arg2, ...])
. Then
the EventLoop
will call await newWire(ev, arg1, arg2, ...)
.
This is backwards-compatible with the older, simpler version.
We also add two new wire types, Sequence
, and ApplyM
.
These express composition of wires two different ways.
The first is created with syntax (wire1 >> wire2
).
It throws away the return values of wire1
and always calls
wire2(ev)
. The second is created with Haskell syntax,
wire1 >= wire2
. It passes the return value of wire1
into wire2
's call. For example, if wire1
returns
(None, [a, ...])
, then wire2 is called as wire2(ev, a, ...)
.
Sequence
andApplyM
classes
-
Wire-s can now be called with more arguments than just the event loop. Accessing this feature requires using a 2-element return tuple, or a Repeat, Forever, or ApplyM wire.
-
Poller now raises an IndexError (instead of an AssertionError) if a duplicate socket is registered.
- Forever was moved into
__init__
so it can be imported directly as aiowire.Forever.
1.1.0 - 2022-02-02
- See README for a complete description of aiowire's basic functionality.
- Fixed ZMQ dependency name to
pyzmq
.