Special thanks to:
Announcement: https://sobolevn.me/2020/06/how-async-should-have-been
💥 Breaking : renames mypy plugin from decorator_plugin to returns_plugin
because of a complete rewrite and lots of new features
💥 Breaking : changes @safe, @impure, impure_safe, @maybe semantics:
they do not work with async functions anymore;
now you are forced to use Future and its helpers
to work with async functions
💥 Breaking : renames Maybe.new to Maybe.from_value.
👍 Because all our other containers support this protocol.
Only Maybe was different, sorry for that!
💥 Breaking : renames .from_success() to .from_value(),
there's no need in two separate methods
💥 Breaking : renames .from_successful_io() to .from_io(),
there's no need in two separate methods
💥 Breaking : renames .from_successful_context() to .from_context(),
there's no need in two separate methods
💥 Breaking : since we now support .apply() method,
🚚 there's no more need in *_squash converters, they are removed
💥 Breaking : renamed Instanceable to Applicative
💥 Breaking : changes .from_io and .from_failed_io of IOResult
to return Any instead of NoReturn unfilled type
💥 Breaking : removes .lift and .lift_* methods from all containers,
use map_, bind_result, bind_io, and other pointfree helpers instead
💥 Breaking : removes @pipeline function. It was a mistake:
it does not work with mixed container types,
it does not type failures properly,
it does not work with IO and Future,
it enforces to write imperative code in a functional codebase.
👉 Use flow instead
➕ Adds typed partial and curry mypy plugins!
➕ Adds typed flow plugin, now it can accept any number of arguments,
it now also has excelent type inference
➕ Adds typed pipe plugin, now it can accept any number of arguments,
it now also has good type inference
➕ Adds managed pipeline function that is useful
for working with stateful computations
➕ Adds typed map_, fix, and alt pointfree functions
Adds typed bind_result, bind_io, bind_ioresult,
bind_context, bind_context_result, bind_future,
bind_async, and bind_awaitable pointfree functions
Adds typed bind_async_future and bind_async_future_result
pointfree functions
➕ Adds typed unify pointfree function
➕ Adds typed apply pointfree function
➕ Adds typed value_or pointfree function
➕ Adds pytest plugin with the ability to tests error handling
➕ Adds Future container to easily work with async functions
➕ Adds FutureResult container to easily work
with async function that might fail
➕ Adds RequiresContextFutureResult container
➕ Adds ReaderFutureResult alias for RequiresContextFutureResult
➕ Adds RequiresContextFutureResultE and ReaderFutureResultE aliases
➕ Adds Future, FutureResult and RequiresContextFutureResult
👌 support for all existing pointfree functions
➕ Adds bind_io method to IOResult
➕ Adds bind_io method to RequiresContextIOResult
➕ Adds or_else method to Maybe
Adds .from_io and .from_failed_io to RequiresContextIOResult
Syncs naming in from_* methods, now all parameters are named inner_value
➕ Adds not_ composition helper
➕ Adds flatten support for Future,
FutureResult and RequiresContextFutureResult
Adds __copy__ and __deepcopy__ magic methods to Immutable class
Speeds up is_successful function
👉 Makes all Context context helpers abstract,
so you cannot create new instances of this class,
also adds __slots__ to these classes
👌 Improves RequiresContext* types with NoDeps where it is logically true
@safe decorator was generating incorrect signaturesAny.rescue() of RequiresContextResult was returning Any.rescue() of RequiresContextIOResult was returning AnyRequiresContextResult and RequiresContextIOResultfinalImmutableStateError was not a subclass of AttributeErrorIOResult was not showing str representationinner_valuepytest-asyncio with anyio plugin,asyncio, trio, curio