Immoney

Latest version: v0.8.0

Safety actively analyzes 623412 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.8.0

What's Changed

* feature: Implement total ordering for Overdraft by antonagestam in https://github.com/antonagestam/immoney/pull/81
* feature: Implement Overdraft floordiv by antonagestam in https://github.com/antonagestam/immoney/pull/83
* feature: Implement SubunitFraction ordering by antonagestam in https://github.com/antonagestam/immoney/pull/84

**Full Changelog**: https://github.com/antonagestam/immoney/compare/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` and `Overdraft` 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 https://github.com/antonagestam/immoney/pull/76
* Implement missing overdraft operations by antonagestam in https://github.com/antonagestam/immoney/pull/77
* feature: Add sequence-of-operations property test by antonagestam in https://github.com/antonagestam/immoney/pull/78

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.6.0...0.7.0

0.6.0

What's Changed

* feature: Implement a wrapper for babel formatting by antonagestam in https://github.com/antonagestam/immoney/pull/73

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.5.0...0.6.0

0.5.0

What's Changed

* feature: Implement `__str__` and `__repr__` without Decimal by antonagestam in https://github.com/antonagestam/immoney/pull/70
* chore: Split test_base into separate modules per entity by antonagestam in https://github.com/antonagestam/immoney/pull/71

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.4.0...0.5.0

0.4.0

What's Changed

⚠️ **_Note!_** There are multiple breaking changes in this release.

* feature: Make Overdraft disjoint and independent of Money by antonagestam in https://github.com/antonagestam/immoney/pull/62
* chore: Test on non-dev Python 3.12 by antonagestam in https://github.com/antonagestam/immoney/pull/63
* feature: Replace Decimal with int representation by antonagestam in https://github.com/antonagestam/immoney/pull/65
* feature: Swap truediv and floordiv implementations by antonagestam in https://github.com/antonagestam/immoney/pull/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**: https://github.com/antonagestam/immoney/compare/0.3.1...0.4.0

0.3.1

What's Changed

* Support Python 3.12 by antonagestam in https://github.com/antonagestam/immoney/pull/37
* fix: Add "type" to currency enum schema tests by antonagestam in https://github.com/antonagestam/immoney/pull/49
* fix: Correct SubunitFraction init signature by antonagestam in https://github.com/antonagestam/immoney/pull/47
* fix: Use inclusive minimum in Money schema by antonagestam in https://github.com/antonagestam/immoney/pull/54
* fix: Use inclusive minimum in Overdraft schema by antonagestam in https://github.com/antonagestam/immoney/pull/57

Thanks to mahmoud for reporting the schema inconsistencies for `Money` and `Overdraft` 🍰

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.3.0...0.3.1

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.