Immoney

Latest version: v0.11.0

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

Scan your dependencies

Page 2 of 3

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

0.3.0

What's Changed

* chore: Add comparison example to README by antonagestam in https://github.com/antonagestam/immoney/pull/42
* chore: Replace custom self types by antonagestam in https://github.com/antonagestam/immoney/pull/43
* chore: Eliminate dependency on immutables by antonagestam in https://github.com/antonagestam/immoney/pull/44
* chore: Eliminate dependency on phantom-types by antonagestam in https://github.com/antonagestam/immoney/pull/45

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

0.2.0

What's Changed

* Use Python 3.11 final by antonagestam in https://github.com/antonagestam/immoney/pull/28
* Add new currencies VED and SLE by antonagestam in https://github.com/antonagestam/immoney/pull/30
* feature: Support Pydantic V2 by antonagestam in https://github.com/antonagestam/immoney/pull/35
* fix: Handle InvalidOperation in precision loss test by antonagestam in https://github.com/antonagestam/immoney/pull/39
* feature: Make CurrencyCollector generic over Currency by antonagestam in https://github.com/antonagestam/immoney/pull/40

New Contributors

* flaeppe made their first contribution in https://github.com/antonagestam/immoney/pull/26

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.1.0...0.2.0

0.1.0

* Implement a currency registry by antonagestam and flaeppe in https://github.com/antonagestam/immoney/pull/18

**Full Changelog**: https://github.com/antonagestam/immoney/compare/0.0.3...0.1.0

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.