Skip to content

v0.5.0

Compare
Choose a tag to compare
@vxgmichel vxgmichel released this 26 Sep 08:34
· 78 commits to main since this release

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