py3: namedtuple takes unicode (journal ext)
authorMateusz Kwapich <mitrandir@fb.com>
Mon, 10 Oct 2016 05:30:14 -0700
changeset 30131 85d5708eae4e
parent 30130 7be610198360
child 30132 72f75eda02ba
py3: namedtuple takes unicode (journal ext) namedtuple usage consistent with changelog.py:141
hgext/journal.py
tests/test-check-py3-compat.t
--- a/hgext/journal.py	Sun Oct 09 09:42:46 2016 -0400
+++ b/hgext/journal.py	Mon Oct 10 05:30:14 2016 -0700
@@ -177,8 +177,8 @@
     return orig(ui, repo, repopath)
 
 class journalentry(collections.namedtuple(
-        'journalentry',
-        'timestamp user command namespace name oldhashes newhashes')):
+        u'journalentry',
+        u'timestamp user command namespace name oldhashes newhashes')):
     """Individual journal entry
 
     * timestamp: a mercurial (time, timezone) tuple
--- a/tests/test-check-py3-compat.t	Sun Oct 09 09:42:46 2016 -0400
+++ b/tests/test-check-py3-compat.t	Mon Oct 10 05:30:14 2016 -0700
@@ -23,7 +23,6 @@
   hgext/fsmonitor/pywatchman/capabilities.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
   hgext/fsmonitor/pywatchman/pybser.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
   hgext/fsmonitor/watchmanclient.py: error importing: <ImportError> No module named 'pybser' (error at __init__.py:*)
-  hgext/journal.py: error importing: <ValueError> Type names and field names must be valid identifiers: "b'journalentry'" (error at journal.py:*)
   hgext/largefiles/basestore.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
   hgext/largefiles/lfcommands.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)
   hgext/largefiles/lfutil.py: error importing: <SyntaxError> cannot mix bytes and nonbytes literals (subversion.py, line 533) (error at convcmd.py:*)