STINNER Victor added the comment:

> The change in issue #29100 - intended AFAICS simply to fix a regression in 
> 3.6 - seems to have made datetime validation via certain code paths stricter 
> than it was in 2.7 or 3.5.

What do you mean by "stricter than 2.7 & 3.5"? The year 30828 was never valid.

Python 2.7 and 3.5:

>>> datetime.datetime(30828, 1, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: year is out of range
>>> datetime.datetime.fromtimestamp(2**37)
datetime.datetime(6325, 4, 8, 17, 4, 32)
>>> datetime.datetime.fromtimestamp(2**38)
Traceback (most recent call last):
  ...
ValueError: year is out of range

Python 3.6.1 should only be stricter than Python 3.6.0.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29921>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to