This project follows semantic versioning.
Possible log types:
[added]for new features.[changed]for changes in existing functionality.[deprecated]for once-stable features removed in upcoming releases.[removed]for deprecated features removed in this release.[fixed]for any bug fixes.[security]to invite users to upgrade in case of vulnerabilities.
[changed]Improve type narrowing foris_okandis_errtype guards by replacingtyping.TypeGuardwithtyping.TypeIs(#193)
0.17.0 - 2024-06-02
[added]Addinspect()andinspect_err()methods (#185)
0.16.1 - 2024-02-29
[fixed]PyPI not showing description (#176)
0.16.0 - 2023-12-23
[added]Addmap_asyncfor async functions (#165)[fixed]Adddo_async()to handle edge case indo()involving multiple inlined awaits (#149)[added]Add support for Python 3.12 (#157)
0.15.0 - 2023-12-04
[added]Adddofunction to support Haskell-style do-notation (#149)
0.14.0 - 2023-11-10
[added]is_okandis_errtype guard functions as alternatives toisinstancechecks (#69)[added]Addand_then_asyncfor async functions (#148)
0.13.1 - 2023-07-19
[fixed]Useself._valueinstead of deprecatedself.valueinErr.expectandErr.unwrapto avoid raising a warning (#133)
0.13.0 - 2023-07-15
[changed]Include capturedErrvalue whenexpectandunwrapare called and anUnwrapErroris raised (#98, #132)
0.12.0 - 2023-06-11
[removed]Drop support for Python 3.7 (#126)[fixed]Pattern matching deprecation warning (#128)[changed]Minor internal implementation details (#129, #130)
0.11.0 - 2023-06-11
[changed]Oknow requires an explicit value during instantiation. Please check out MIGRATING.md, it will guide you through the necessary change in your codebase.[deprecated]valueproperty to access the inner value (#37, #121)[added]ok_valueanderr_valueto access the inner value more safely (#37, #121)
0.10.0 - 2023-04-29
[fixed]Make python version check PEP 484 compliant (#118)[added]as_async_resultdecorator to turn regular async functions intoResultreturning ones (#116)
0.9.0 - 2022-12-09
[added]Implementunwrap_or_raise(#95)[added]Add support for Python 3.11 (#107)[changed]Narrowing of return types on methods ofErrandOk. (#106)[fixed]Fix failing type inference forResult.mapand similar method unions (#106)
0.8.0 - 2022-04-17
[added]as_resultdecorator to turn regular functions intoResultreturning ones (#33, 71)[removed]Drop support for Python 3.6 (#49)[added]Implementunwrap_or_else(#74),and_then(#90) andor_else(#90)
0.7.0 - 2021-11-19
[removed]Drop support for Python 3.5 (#34)[added]Add support for Python 3.9 and 3.10 (#50)[changed]Make theOktype covariant in regard to its wrapped typeT. Likewise forErrin regard toE. This should result in more intuitive type checking behaviour. For instance,Err[TypeError]will get recognized as a subtype ofErr[Exception]by type checkers. See PEP 438 for a detailed explanation of covariance and its implications.[added]Add support for Python 3.10 pattern matching (#47)[changed]OkandErrnow define__slots__to save memory (#55, #58)[changed]The generic type ofUnwrapError.resultnow explicitly specifiesAny(#67)
0.6.0 - 2021-03-17
IMPORTANT: This release a big API refactoring to make the API more type safe. Unfortunately this means some breaking changes. Please check out MIGRATING.md, it will guide you through the necessary changes in your codebase.
- [changed] Split result type into
OkandErrclasses (#17, #27) - [deprecated] Python 3.4 support is deprecated and will be removed in the next release
0.5.0 - 2020-03-03
- [added] Implement
map,map_err,map_orandmap_or_else(#19) - [added] Add
unwrap_errandexpect_errmethods (#26) - [changed] Type annotations: Change parameter order
from
Result[E, T]toResult[T, E]to match Rust/OCaml/F# (#7)
0.4.1 - 2020-02-17
- [added] Add
py.typedfor PEP561 package compliance (#16)
0.4.0 - 2019-04-17
- [added] Add
unwrap,unwrap_orandexpect(#9) - [removed] Drop support for Python 2 and 3.3
- [changed] Only install typing dependency for Python <3.5
0.3.0 - 2017-07-12
- [added] This library is now fully type annotated (#4, thanks @tyehle)
- [added] Implementations for
__ne__,__hash__and__repr__ - [deprecated] Python 2 support is deprecated and will be removed in the 0.4 release
0.2.2 - 2016-09-21
- [added]
__eq__magic method
0.2.0 - 2016-05-05
- [added] Convenience default:
Ok()==Ok(True)
0.1.1 - 2015-12-14
- [fixed] Import bugfix
0.1.0 - 2015-12-14
- Initial version