returns v0.13.0 Release Notes

Release Date: 2020-02-02 // about 4 years ago
  • Announcing article: https://sobolevn.me/2020/02/typed-functional-dependency-injection

    ๐Ÿ”‹ Features

    ๐Ÿ’ฅ Breaking : renames join to flatten, sorry!

    ๐Ÿ’ฅ Breaking : renames box to bind and moves it to returns.pointfree

    ๐Ÿ’ฅ Breaking : removes Maybe.rescue and Maybe.fix methods

    ๐Ÿ’ฅ Breaking : renames io_squash to squash_io
    ๐Ÿšš and moves it to returns.converters

    ๐Ÿ’ฅ Breaking : moves all interfaces from returns.primitives.container to
    returns.primitives.interfaces

    โž• Adds rescue pointfree function

    โž• Adds ResultE alias for Result[..., Exception]

    โž• Adds RequiresContext container and Context helper class

    โž• Adds RequiresContext support for bind pointfree function

    โž• Adds RequiresContext support for flatten function

    โž• Adds RequiresContextResult container

    โž• Adds RequiresContextResultE alias

    โž• Adds ReaderResult and ReaderResultE aliases
    ๐Ÿ‘ป for RequiresContextResult[..., ..., Exception]

    โž• Adds RequiresContextResult support for bind and rescue

    โž• Adds RequiresContextResult support for flatten

    โž• Adds IOResult helper to work better with IO[Result[a, b]]

    โž• Adds IOResultE alias for IOResult[a, Exception]

    โž• Adds IOResult support for bind

    โž• Adds IOResult support for flatten

    โž• Adds IOResult support for @pipeline

    โž• Adds IOResult support for coalesce

    โž• Adds IOResult support for is_successful

    โž• Adds RequiresContextIOResult container

    โž• Adds RequiresContextIOResultE alias

    โž• Adds ReaderIOResult and ReaderIOResultE aliases
    ๐Ÿ‘ป for RequiresContextIOResult[..., ..., Exception]

    โž• Adds RequiresContextIOResult support for bind and rescue

    โž• Adds RequiresContextIOResult support for flatten

    โž• Adds Result.lift, Maybe.lift, RequiresContext.lift,
    and RequiresContextResult.lift functions in addition to IO.lift

    โž• Adds Immutable primitive type

    Adds Unitable protocol and .from_success() and .from_failure()
    methods for all Result realted classes

    โž• Adds Instanceable protocol and .from_value() method
    for IO and RequiresContext

    โž• Adds flow function, which is similar to pipe

    โž• Adds swap coverter for Result and IOResult

    โž• Adds squash_context function to squash RequiresContext similar to IO

    ๐Ÿ›  Bugfixes

    • Now Success and Failure (both io and pure) return Any and not NoReturn
    • ๐Ÿ›  Fixes how flatten works, also adds more tests and docs about Failure case
    • ๐Ÿ›  Fixes Unwrappable type being parametrized with only one TypeVar
    • ๐Ÿ”„ Changes Success and Failure to return Any instead of NoReturn

    Misc

    • โšก๏ธ Updates poetry version in travis
    • ๐Ÿ“„ Imporves pipe docs with lambda and Generic problem
    • ๐Ÿ‘Œ Improves docs in several places
    • โœ… Now examples in docs tries to be docstests where possible
    • ๐Ÿ”„ Changes how tests are checked with mypy in CI