All Versions
23
Latest Version
Avg Release Cycle
57 days
Latest Release
-

Changelog History
Page 1

  • v0.19.1 Changes

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes a problem with do-notation and type aliases
    • ๐Ÿ›  Fixes custom pickle protocol to handle None values gracefully
    • โœ‚ Removes broken drylabs.io link in README
    • ๐Ÿ“š Revises pointfree documentation
  • v0.19.0 Changes

    ๐Ÿ”‹ Features

    • โž• Adds do notation
    • โž• Adds attempt decorator

    Misc

    • Check __slots__ correctness with slotscheck
  • v0.18.0 Changes

    ๐Ÿ†• New Year Release! ๐ŸŽ„

    ๐Ÿ”‹ Features

    • Now requires typing_extensions>=4.0
    • Now requires mypy>=0.930
    • โœ‚ Removes plugin for @safe, @maybe, @future, etc. Because we now use ParamSpec type to properly type decorators

    ๐Ÿ›  Bugfixes

    • Fixes __slots__ not being set properly in containers and their base classes
    • ๐Ÿ›  Fixes patching of containers in pytest plugin not undone after each test
  • v0.17.1 Changes

    ๐Ÿ›  Bugfixes

    • Fixes __slots__ not being set properly in containers and their base classes
    • ๐Ÿ›  Fixes patching of containers in pytest plugin not undone after each test
  • v0.17.0 Changes

    ๐Ÿ”‹ Features

    • ๐Ÿ‘ Enables Pattern Matching support for Result containers
    • ๐Ÿ‘ Enables Pattern Matching support for Maybe container
    • ๐Ÿ‘ Enables Pattern Matching support for IOResult container
    • ๐Ÿ‘Œ Improves hypothesis plugin, now we detect when type cannot be constructed and give a clear error message
    • โž• Adds the option to pass what exceptions @safe will handle
  • v0.16.0 Changes

    ๐Ÿ”‹ Features

    • ๐Ÿ‘‰ Makes _Nothing a singleton
    • ๐Ÿ”จ Refactor flow function to be faster

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes that assert_trace was not catching containers from @safe-wrapped functions

    Misc

    • ๐Ÿ›  Fixes typos in documentation
  • v0.15.0 Changes

    October 21, 2020

    ๐Ÿ”‹ Features

    โž• Adds Higher Kinded Types partial support

    ๐Ÿ’ฅ Breaking : drops python3.6 support

    ๐Ÿ’ฅ Breaking : makes our mypy plugin not optional, but required!

    ๐Ÿ’ฅ Breaking : changes all RequiresContext-based type arguments order,
    previously we used to specify _EnvType as the first type argument,
    now it is the last one. This is done to respect new HKT rules

    ๐Ÿ’ฅ Breaking : renames .rescue to .lash

    ๐Ÿ’ฅ Breaking : removes all old interfaces from primitives/interfaces.py,
    ๐Ÿ‘‰ use new typeclasses instead

    ๐Ÿ’ฅ Breaking : Maybe is fully reworked to be lawful

    ๐Ÿ’ฅ Breaking : removes value_or pointfree method,
    because it is impossible to express with HKT

    ๐Ÿ’ฅ Breaking : removes .value_or, .unwrap, and .failure methods
    from FutureResult and RequiresContext-based types,
    ๐Ÿ‘ป because we do require these methods to raise an exception on failure,
    ๐Ÿ‘ป but these methods were lazy and did not raise the required exception

    ๐Ÿ’ฅ Breaking : changes how is_successful is typed:
    now we allow any Unwrappable interface instances there,
    including custom ones

    ๐Ÿ’ฅ Breaking : changes UnwrapFailedError constructor,
    now it does accept an Unwrappable instance instead of a BaseContainer

    ๐Ÿ’ฅ Breaking : removes .fix method from all containers,
    ๐Ÿšš also removes fix pointfree function

    ๐Ÿ’ฅ Breaking : Removes coalesce function,
    because it is impossible to properly type it

    ๐Ÿ’ฅ Breaking : Removes all Context* based types with .ask() method,
    ๐Ÿ‘‰ use new .ask() methods on the Reader-based containers

    ๐Ÿ’ฅ Breaking : Now Future and FutureResult can be awaited multiple times

    ๐Ÿ’ฅ Breaking : Removes .unify() method from several containers,
    ๐Ÿ‘‰ use unify() pointfree function instead

    ๐Ÿ’ฅ Breaking : Removes .from_iterable method from all containers,
    ๐Ÿ‘ instead adds better iterables support,
    we now have returns.iterables module with Fold helper

    ๐Ÿ’ฅ Breaking : Renames property empty to no_args of
    all RequiresContext-based classes

    โž• Adds new public interfaces: see returns.interfaces

    โž• Adds methods package with several helpful things inside

    โž• Adds FutureSuccess and FutureFailure unit functions
    to be similar to Result and IOResult

    โž• Adds .swap method to Result, IOResult, FutureResult,
    and other result based containers

    Adds .modify_env method to all RequiresContext* types

    โž• Adds .rescue to Maybe

    โž• Adds .equals methods to types that can be compared directly:
    Result, Maybe, IO, IOResult

    Adds missing from_requires_context_future_result to RequiresContext

    Adds .from_optional and .bind_optional to Maybe container

    Adds __slots__ to UnwrapFailedError with halted_container

    ๐Ÿ”„ Changes flatten to work with KindN and any possible container

    โž• Adds a helper to test traces to our pytest plugin

    โž• Adds cond function to pointfree and methods packages

    โž• Adds compose_result HKT method and pointfree function

    โž• Adds unify HKT pointfree function

    โž• Adds bimap pointfree function

    Adds unwrap_or_failure function to methods package

    โž• Adds collect_trace helper function for better development experience

    โž• Adds hypothesis intergration and pre-defined "monad laws as values"

    โž• Adds assert_equal method to our pytest plugin

    ๐Ÿ›  Bugfixes

    • ๐Ÿ’ฅ Breaking : fixes serious typing issue and changes how flow works
    • ๐Ÿ’ฅ Breaking : fixes serious typing issue and changes how pipe works,
      now it has a hard limit of 20 parameters
    • ๐Ÿ›  Fixes that RequiresContextFutureResult was not supported by pytest plugin
    • ๐Ÿ›  Fixes incorrect partial behaviour in an edge case, #618
    • ๐Ÿ›  Fixes that .apply method of IOResult was working incorrectly,
      it was returning IOFailure(2)
      as a result of IOFailure(1).apply(IOFailure(2))
    • ๐Ÿ›  Fixes bug that safe(tap(...)) was revealing invalid types sometimes

    Misc

    • โž• Adds a lot of new typetests
    • Checks that now all math laws are checked for all types
    • ๐Ÿ”„ Changes docs structure, adds new Interfaces, HKT, and Methods pages
    • Changed __str__ method in BaseContainer class to __repr__ method
    • โž• Adds Quickstart guide
  • v0.14.0 Changes

    June 07, 2020

    Special thanks to:

    Announcement: https://sobolevn.me/2020/06/how-async-should-have-been

    ๐Ÿ”‹ Features

    ๐Ÿ’ฅ 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

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes that @safe decorator was generating incorrect signatures
      for functions with Any
    • ๐Ÿ›  Fixes that .rescue() of RequiresContextResult was returning Any
    • ๐Ÿ›  Fixes that .rescue() of RequiresContextIOResult was returning Any
    • ๐Ÿ›  Fixes that RequiresContextResult and RequiresContextIOResult
      were not final
    • ๐Ÿ›  Fixes that ImmutableStateError was not a subclass of AttributeError
    • ๐Ÿ›  Fixes that IOResult was not showing str representation
      of wrapped inner_value

    Misc

    • โœ… Replaces pytest-asyncio with anyio plugin,
      โœ… now we test compatibility with any IO stack: asyncio, trio, curio
    • โšก๏ธ Updates lots of dependencies
    • โž• Adds lots of new tests
    • โšก๏ธ Updates lots of docs
    • โœ‚ Removes "IO marker" name from docs in favor for "IO container",
      it is not special at all. Why would we call it differently?
  • v0.13.0 Changes

    February 02, 2020

    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
  • v0.12.0 Changes

    December 21, 2019

    ๐Ÿ”‹ Features

    • ๐Ÿ’ฅ Breaking : now @pipeline requires a container type when created:
      @pipeline(Result) or @pipeline(Maybe)
    • Maybe and Result now has success_type and failure_type aliases
    • โž• Adds Result.unify utility method for better error type composition
    • ๐Ÿ‘ We now support dry-python/classes as a first-class citizen
    • โž• Adds io_squash to squash several IO containers into one container
      with a tuple inside, currently works with 9 containers max at a time
    • โž• Adds untap function which does convert return type to None

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixes that containers were not usable with multiprocessing
    • ๐Ÿ”„ Changes the inheritance order, now BaseContainer is the first child
    • ๐Ÿ›  Fixes that Nothing had incorrect docstrings

    Misc

    • ๐Ÿ“ฆ Now generated package is protected
    • โšก๏ธ Updates poetry to 1.0