logilab-common #82161 python3: logilab.common.date.ustrftime() is incompatible [done]
From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
logilab.common.date.ustrftime() is incompatible with Python 3:
$ python2.7 -c 'import datetime, logilab.common.date; print(repr(logilab.common.date.ustrftime(datetime.date(2011, 10, 28))))'
datetime.date.strftime() already returns str instead of bytes in Python 3, so decoding is not needed.
logilab.common.date.ustrftime() tries to support dates before year 1900.
$ python3.1 -c 'import datetime; print(repr(datetime.date(1, 1, 1).strftime("%Y-%m-%d")))'
I'm attaching the patch, which fixes logilab.common.date.ustrftime(). | |
priority | normal |
---|---|
type | bug |
done in | 0.58.3 |
load left | 0.000 |
closed by | #29e8e0b50e57 fix date.ustrftime for python3, closes #82161 |
- pylint #110213 "No such message id W0704" when using Python 3.3
- logilab-common #53393 python3: fix tests and run them also during build
- logilab-astng #83138 AttributeError: Starred object has no attribute 'ass_type'
- logilab-common #104047 Tests fails when run under python3
- logilab-common #120897 Installation fails on Python 3.3