[pypy-issue] Issue #2458: date overflow in JIT mode (pypy/pypy)

Ryan Liu issues-reply at bitbucket.org
Fri Dec 30 05:38:26 EST 2016

New issue 2458: date overflow in JIT mode

Ryan Liu:

When I run pypy file like this, It throw OverflowError
But It is OK under pypy REPL

from datetime import date, timedelta
dt = date(2016, 12, 28)
dt += timedelta(4)
The traceback log is

    self.calender += timedelta(4)
  File "pypy2-5.6.0/lib_pypy/datetime.py", line 918, in __add__
    return self._add_timedelta(other, 1)
  File "pypy2-5.6.0/lib_pypy/datetime.py", line 912, in _add_timedelta
    self._day + other.days * factor)
  File "pypy2-5.6.0/lib_pypy/datetime.py", line 415, in _normalize_date
    raise OverflowError("date value out of range")
OverflowError: date value out of range

More information about the pypy-issue mailing list