v0.5.0
Changes:
- Drop python 3.7 support
- Add type annotations (issue #36, PR #84)
- Add task_limit argument to action operator (issue #85, PR #86)
Warning
A breaking change has slipped into this release: The merge
, chain
and ziplatest
operators used to work with no sources provided:
assert await (stream.merge() | pipe.list()) == []
assert await (stream.chain() | pipe.list()) == []
assert await (stream.ziplatest() | pipe.list()) == []
This is no longer the case for releases 0.5.x
, where at least one async iterable has to be provided for those operators.
This can be a problem for code that passes an arbitrary list of arguments to the operator, as this list might be empty.
A workaround exists for the merge
operator, which works by adding stream.empty()
to the list of arguments:
args = []
new_args = stream.empty(), *args
assert await (stream.merge(*new_args) | pipe.list()) == []
The zip
operator should have also been affected, although the former version had a bug that caused an empty zip to block indefinitely.
This change has been fixed in v0.6.0