You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The in 2.4.0 introduced MaxValueValidator sets as default 1e50 leading to have a float as max value, but the NumberFilter uses a DecimalField as base leading to FloatOperation exceptions if the corresponding trap is activated on the Decimal context. (https://docs.python.org/3/library/decimal.html#decimal.FloatOperation)
This is not visible for most people, I guess - we've it on in our test/dev-setup to not mix Floats and Decimals. I assume the max-value should either be a Decimal itself? (or a int(1e50) would probably suffice already.
In [2]: type(1e50)
Out[2]: float
The text was updated successfully, but these errors were encountered:
wearebasti
changed the title
New MaxValueValidator on NumberFilter breaks decimal logic
New MaxValueValidator on NumberFilter triggers Decimal FloatOperation trap
Sep 29, 2020
The in 2.4.0 introduced
MaxValueValidator
sets as default1e50
leading to have afloat
as max value, but theNumberFilter
uses aDecimalField
as base leading toFloatOperation
exceptions if the corresponding trap is activated on the Decimal context. (https://docs.python.org/3/library/decimal.html#decimal.FloatOperation)This is not visible for most people, I guess - we've it on in our test/dev-setup to not mix Floats and Decimals. I assume the max-value should either be a Decimal itself? (or a
int(1e50)
would probably suffice already.The text was updated successfully, but these errors were encountered: