- Merged Python 2 and 3 sources.
Migrated to Babel 2.2 or higher. New CLDR and new API for
babel.numbers.format_currency()
(reported by chrisrossi).Dropped support for Python 3.3
XMoney now only attempts automatic currency conversion in addition, substraction, and division.
Before, XMoney would convert currencies in comparison, including >= and <=, with results that were inconsistent with ==.
Comparison operators
<
,<=
,>
,>=
now throwInvalidOperandType
(TypeError) if the operand is not a Money object. Code that relies on this should be updated to access the amount value explicitly (see example below).
>>> m = Money(2, 'USD')
# old code
>>> m > 0
(raises InvalidOperandType)
# 1.3.x
>>> m.amount > 0
True
- Throw an exception if used with Babel 2.2 or higher (reported by chrisrossi).
- Added support for SQLAlchemy composite columns (by dahlia)
- Fixed bug in __rsub__() (fix by zedlander)
- Multiplication between a Money object and a float does not implicitly convert the float to a Decimal anymore. (reported by spookylukey)
- Fixed bug in __rsub__() (fix by zedlander)
- Added tox testing (requested by kvesteri)
- Compatible with Python 2.7, 3.3, 3.4 (requested by kvesteri)
- Initial stable version
- Compatible with Python 3.3