Mercurial > hg
comparison mercurial/templater.py @ 30033:02dbfaa6df0b
py3: convert encoding name and mode to str
Otherwise tolocal() and fromlocal() wouldn't work on Python 3. Still tolocal()
can't make a valid localstr object because localstr inherits str, but it can
return some object without raising exceptions.
Since Py3 bytes() behaves much like bytearray() than str() of Py2, we can't
simply do s/str/bytes/g. I have no good idea to handle str/bytes divergence.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 28 Sep 2016 20:39:06 +0900 |
parents | e83f89d3b1f7 |
children | f18cc848b48e |
comparison
equal
deleted
inserted
replaced
30032:2219f4f82ede | 30033:02dbfaa6df0b |
---|