[issue29921] datetime validation is stricter in 3.6.1 than previous versions

m-parry report at bugs.python.org
Tue Mar 28 08:23:58 EDT 2017


m-parry added the comment:

That's just a Python C API call. It looks like it eventually resolves to new_datetime_ex(30828, 9, 13, 3, 48, 5, 480000, Py_None, PyDateTime_DateTimeType).

We also have some internal code that sees a similar problem from calling PyTime_FromTime(), that was similarly affected by this change. In one example, that appears to resolve to new_time_ex(24, 0, 0, 0, Py_None, PyDateTime_TimeType). Again, under <3.6.1, that was accepted. (And again, I am making no argument about the validity of this code, just with regards to backwards compatibility.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29921>
_______________________________________


More information about the Python-bugs-list mailing list