github dry-python/returns 0.13.0
Version 0.13.0

latest releases: 0.22.0, 0.21.0, 0.20.1...
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

Don't miss a new returns release

NewReleases is sending notifications on new releases.