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
{{ message }}
Repository navigation
DateTime: Large numbers, infinity and NaN are not handled properly #5840
DateTime has at least two kinds of issues with numbers:
Large integers cause problems because they overflow if converted to floats.
Infinity and NaN aren't handled properly.
These issues were noticed when fixing a bad error when timedelta conversion failed due to values being too large (#5834) in RF 7.5.1. Fixing many of these issues would have been easier if invalid values (i.e. inf and nan) were rejected in input, but that could have caused backwards incompatibility problems. We expect that using these values is always an error, so changing the behavior in a feature release ought to be fine.
Problems are mostly related to execution failing with bad error messages. Fixes include checking that numbers are finite (i.e. not inf or nan) using math.isfinite and catching OverflowError. Typically in such cases we simply can raise a ValueError with a clear message.
Activity