[issue16137] Using time.asctime() with an array with negative tm_hour causes Python Crash.

Alexander Belopolsky report at bugs.python.org
Tue Feb 5 01:35:26 CET 2013


Alexander Belopolsky added the comment:

Benjamin,

I am assigning this to you because 2.7.4 release is probably the last chance to do something about this behavior in 2.7 series.

I am tentatively resolving this as "won't fix."  In 3.x, we decided that well defined behavior is more important than bug compatibility on broken platforms.  For 2.x, however, the priorities are different.  In this particular case, it is very easy to work around platform bug, but if we add a bound check, we may break code that works.

For example, on a recent Mac OS X release and preloaded Python 2.7, I get:

Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.asctime((2011,1,1,-1,0,0,0,0,0))
'Mon Jan  1 -01:00:00 2011\n'

This behavior is not "obviously wrong."

Please close this or make it a release blocker.  I don't think there is any value in letting this linger past 2.7.4 release.

----------
assignee:  -> benjamin.peterson
nosy: +benjamin.peterson
resolution:  -> wont fix
status: open -> pending

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


More information about the Python-bugs-list mailing list