Releases: antonagestam/immoney
0.11.0
0.10.0
What's Changed
- chore: Expose version by @antonagestam in #104
- fix: Support extracting generic bound from TypeVar by @antonagestam in #88
Full Changelog: 0.9.0...0.10.0
0.9.0
What's Changed
- feature: Support pydantic-core 2.10+ by @antonagestam in #89
Full Changelog: 0.8.0...0.9.0
0.8.0
What's Changed
- feature: Implement total ordering for Overdraft by @antonagestam in #81
- feature: Implement Overdraft floordiv by @antonagestam in #83
- feature: Implement SubunitFraction ordering by @antonagestam in #84
Full Changelog: 0.7.0...0.8.0
0.7.0
This is a big milestone in completeness and stability. The sequence-of-operations property test had been on my list of things for a long time, finally writing it did two things:
- Revealed some operations on
SubunitFraction
andOverdraft
that were glaringly missing. - Helped identify a bug in
Money.__rtruediv__
that would have otherwise passed its unit tests (it failed raising an exception for division by zero and instead returned zero).
So quite a big yield for a moderately sized investment.
What's Changed
- Implement missing subunit fraction operations by @antonagestam in #76
- Implement missing overdraft operations by @antonagestam in #77
- feature: Add sequence-of-operations property test by @antonagestam in #78
Full Changelog: 0.6.0...0.7.0
0.6.0
What's Changed
- feature: Implement a wrapper for babel formatting by @antonagestam in #73
Full Changelog: 0.5.0...0.6.0
0.5.0
What's Changed
- feature: Implement
__str__
and__repr__
without Decimal by @antonagestam in #70 - chore: Split test_base into separate modules per entity by @antonagestam in #71
Full Changelog: 0.4.0...0.5.0
0.4.0
What's Changed
- feature: Make Overdraft disjoint and independent of Money by @antonagestam in #62
- chore: Test on non-dev Python 3.12 by @antonagestam in #63
- feature: Replace Decimal with int representation by @antonagestam in #65
- feature: Swap truediv and floordiv implementations by @antonagestam in #68
Overdraft can no longer have value=0
In order to make Overdraft
disjoint with the Money
type, and make sure there is a single answer to the question "how is zero money represented?", the Overdraft
type has been updated to give an error for such instantiations. With this same change, Overdraft
was also updated to carry its own value and currency, these are now accessed through the .subunits
and .currency
attributes. The .money
attribute has been removed.
Decimal is replaced with int
This means that Money
and Overdraft
no longer has an internal Decimal value, but instead carries a .subunits
integer attribute. An ad-hoc Decimal can be constructed through the .decimal
property on both types.
Swap __truediv__
and __floordiv__
The implementations of /
and //
have swapped places for Money
, which means SEK(1) / 1
now returns a SubunitFraction
instead of a tuple
of Money
instances.
Full Changelog: 0.3.1...0.4.0
0.3.1
What's Changed
- Support Python 3.12 by @antonagestam in #37
- fix: Add "type" to currency enum schema tests by @antonagestam in #49
- fix: Correct SubunitFraction init signature by @antonagestam in #47
- fix: Use inclusive minimum in Money schema by @antonagestam in #54
- fix: Use inclusive minimum in Overdraft schema by @antonagestam in #57
Thanks to @mahmoud for reporting the schema inconsistencies for Money
and Overdraft
🍰
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
- chore: Add comparison example to README by @antonagestam in #42
- chore: Replace custom self types by @antonagestam in #43
- chore: Eliminate dependency on immutables by @antonagestam in #44
- chore: Eliminate dependency on phantom-types by @antonagestam in #45
Full Changelog: 0.2.0...0.3.0