Announcing article: https://sobolevn.me/2020/02/typed-functional-dependency-injection
Features
-
Breaking: renames
join
toflatten
, sorry! -
Breaking: renames
box
tobind
and moves it toreturns.pointfree
-
Breaking: removes
Maybe.rescue
andMaybe.fix
methods -
Breaking: renames
io_squash
tosquash_io
and moves it toreturns.converters
-
Breaking: moves all interfaces from
returns.primitives.container
to
returns.primitives.interfaces
-
Adds
rescue
pointfree function -
Adds
ResultE
alias forResult[..., Exception]
-
Adds
RequiresContext
container andContext
helper class -
Adds
RequiresContext
support forbind
pointfree function -
Adds
RequiresContext
support forflatten
function -
Adds
RequiresContextResult
container -
Adds
RequiresContextResultE
alias -
Adds
ReaderResult
andReaderResultE
aliases
forRequiresContextResult[..., ..., Exception]
-
Adds
RequiresContextResult
support forbind
andrescue
-
Adds
RequiresContextResult
support forflatten
-
Adds
IOResult
helper to work better withIO[Result[a, b]]
-
Adds
IOResultE
alias forIOResult[a, Exception]
-
Adds
IOResult
support forbind
-
Adds
IOResult
support forflatten
-
Adds
IOResult
support for@pipeline
-
Adds
IOResult
support forcoalesce
-
Adds
IOResult
support foris_successful
-
Adds
RequiresContextIOResult
container -
Adds
RequiresContextIOResultE
alias -
Adds
ReaderIOResult
andReaderIOResultE
aliases
forRequiresContextIOResult[..., ..., Exception]
-
Adds
RequiresContextIOResult
support forbind
andrescue
-
Adds
RequiresContextIOResult
support forflatten
-
Adds
Result.lift
,Maybe.lift
,RequiresContext.lift
,
andRequiresContextResult.lift
functions in addition toIO.lift
-
Adds
Immutable
primitive type -
Adds
Unitable
protocol and.from_success()
and.from_failure()
methods for allResult
realted classes -
Adds
Instanceable
protocol and.from_value()
method
forIO
andRequiresContext
-
Adds
flow
function, which is similar topipe
-
Adds
swap
coverter forResult
andIOResult
-
Adds
squash_context
function to squashRequiresContext
similar toIO
Bugfixes
- Now
Success
andFailure
(bothio
and pure) returnAny
and notNoReturn
- Fixes how
flatten
works, also adds more tests and docs aboutFailure
case - Fixes
Unwrappable
type being parametrized with only oneTypeVar
- Changes
Success
andFailure
to returnAny
instead ofNoReturn
Misc
- Updates
poetry
version intravis
- Imporves
pipe
docs withlambda
andGeneric
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