Message249530
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))'
0:00:00.000001
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=0.5))'
0:00:00
datetime.timedelta must also use the ROUND_HALF_UP method, as Python 2, instead of ROUND_HALF_EVEN (datetime.py uses the round() function).
$ python2 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'
0:00:00.000002
$ python3 -c 'import datetime; print(datetime.timedelta(microseconds=1.5))'
0:00:00.000002
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:47 | vstinner | set | recipients:
+ vstinner, tim.peters, mark.dickinson, belopolsky, larry, r.david.murray, aconrad, vivanov, python-dev, tbarbugli, trcarden |
2015-09-02 08:56:47 | vstinner | set | messageid: <1441184207.35.0.686524371812.issue23517@psf.upfronthosting.co.za> |
2015-09-02 08:56:47 | vstinner | link | issue23517 messages |
2015-09-02 08:56:47 | vstinner | create | |
|