New issue 2458: date overflow in JIT mode
https://bitbucket.org/pypy/pypy/issues/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
```
#!python

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

```
#!python
    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
```



_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to