Mercurial > hg-stable
changeset 29710:2f64e5a6efb8
py3: use unicode literals in changelog.py
collections.namedtuple type and field names must be str in Python 3.
Our custom module importer was rewriting them to bytes literals,
making this fail.
In addition, __slots__ values must also be unicode.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 04 Aug 2016 00:15:39 +0530 |
parents | f2846d546645 |
children | 00269c6e4f6e |
files | mercurial/changelog.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/changelog.py Mon Jul 25 15:10:52 2016 +0200 +++ b/mercurial/changelog.py Thu Aug 04 00:15:39 2016 +0530 @@ -138,9 +138,10 @@ return appender(opener, name, mode, buf) return _delay -_changelogrevision = collections.namedtuple('changelogrevision', - ('manifest', 'user', 'date', - 'files', 'description', 'extra')) +_changelogrevision = collections.namedtuple(u'changelogrevision', + (u'manifest', u'user', u'date', + u'files', u'description', + u'extra')) class changelogrevision(object): """Holds results of a parsed changelog revision. @@ -151,8 +152,8 @@ """ __slots__ = ( - '_offsets', - '_text', + u'_offsets', + u'_text', ) def __new__(cls, text):