Author vstinner
Recipients aconrad, belopolsky, larry, mark.dickinson, python-dev, r.david.murray, tbarbugli, tim.peters, trcarden, vivanov, vstinner
Date 2015-09-02.08:56:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Larry Hasting wrote:
>> too late for 3.5.0
> How's that?

Well, for example... my change broke all buildbots.

I don't think that it's good idea to rush to fix Python 3.5 :-) This part of Python (handling timestamps, especially the rounding mode) is complex, I prefer to check for all buildbots and wait for some feedback from users (wait at least 2 weeks).

I reverted my change, another function must be changed:

$ python2 -c 'import datetime; print(datetime.timedelta(microseconds=0.5))'
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=0.5))'

datetime.timedelta must also use the ROUND_HALF_UP method, as Python 2, instead of ROUND_HALF_EVEN ( uses the round() function).

$ python2 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'

I have to rework my patch to use ROUND_HALF_UP in datetime.timedelta(), datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp(), and update test_datetime.
Date User Action Args
2015-09-02 08:56:47vstinnersetrecipients: + vstinner, tim.peters, mark.dickinson, belopolsky, larry, r.david.murray, aconrad, vivanov, python-dev, tbarbugli, trcarden
2015-09-02 08:56:47vstinnersetmessageid: <>
2015-09-02 08:56:47vstinnerlinkissue23517 messages
2015-09-02 08:56:47vstinnercreate