[PATCH 5 of 6] osutil: use unicode literals to appease Python 3

Gregory Szorc gregory.szorc at gmail.com
Wed Jun 1 01:53:02 EDT 2016


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1464759378 25200
#      Tue May 31 22:36:18 2016 -0700
# Node ID 856a1794f165a93ec8eb6fe1963b0ca1a68c647b
# Parent  58033b58046aecaf64f59b3557f50b2aacfe98b5
osutil: use unicode literals to appease Python 3

The first element of _files tuples must be a str in Python 3.
Attribute names must also be str.

diff --git a/mercurial/pure/osutil.py b/mercurial/pure/osutil.py
--- a/mercurial/pure/osutil.py
+++ b/mercurial/pure/osutil.py
@@ -75,43 +75,43 @@ if os.name != 'nt':
         _msg_iovlen_t = ctypes.c_size_t
     else:
         _cmsg_len_t = _socklen_t
         _msg_controllen_t = _socklen_t
         _msg_iovlen_t = ctypes.c_int
 
     class _iovec(ctypes.Structure):
         _fields_ = [
-            ('iov_base', ctypes.c_void_p),
-            ('iov_len', ctypes.c_size_t),
+            (u'iov_base', ctypes.c_void_p),
+            (u'iov_len', ctypes.c_size_t),
         ]
 
     class _msghdr(ctypes.Structure):
         _fields_ = [
-            ('msg_name', ctypes.c_void_p),
-            ('msg_namelen', _socklen_t),
-            ('msg_iov', ctypes.POINTER(_iovec)),
-            ('msg_iovlen', _msg_iovlen_t),
-            ('msg_control', ctypes.c_void_p),
-            ('msg_controllen', _msg_controllen_t),
-            ('msg_flags', ctypes.c_int),
+            (u'msg_name', ctypes.c_void_p),
+            (u'msg_namelen', _socklen_t),
+            (u'msg_iov', ctypes.POINTER(_iovec)),
+            (u'msg_iovlen', _msg_iovlen_t),
+            (u'msg_control', ctypes.c_void_p),
+            (u'msg_controllen', _msg_controllen_t),
+            (u'msg_flags', ctypes.c_int),
         ]
 
     class _cmsghdr(ctypes.Structure):
         _fields_ = [
-            ('cmsg_len', _cmsg_len_t),
-            ('cmsg_level', ctypes.c_int),
-            ('cmsg_type', ctypes.c_int),
-            ('cmsg_data', ctypes.c_ubyte * 0),
+            (u'cmsg_len', _cmsg_len_t),
+            (u'cmsg_level', ctypes.c_int),
+            (u'cmsg_type', ctypes.c_int),
+            (u'cmsg_data', ctypes.c_ubyte * 0),
         ]
 
-    _libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
-    _recvmsg = getattr(_libc, 'recvmsg', None)
+    _libc = ctypes.CDLL(ctypes.util.find_library(u'c'), use_errno=True)
+    _recvmsg = getattr(_libc, u'recvmsg', None)
     if _recvmsg:
-        _recvmsg.restype = getattr(ctypes, 'c_ssize_t', ctypes.c_long)
+        _recvmsg.restype = getattr(ctypes, u'c_ssize_t', ctypes.c_long)
         _recvmsg.argtypes = (ctypes.c_int, ctypes.POINTER(_msghdr),
                              ctypes.c_int)
     else:
         # recvmsg isn't always provided by libc; such systems are unsupported
         def _recvmsg(sockfd, msg, flags):
             raise NotImplementedError('unsupported platform')
 
     def _CMSG_FIRSTHDR(msgh):
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -30,159 +30,157 @@
   tests/md5sum.py not using absolute_import
   tests/readlink.py not using absolute_import
   tests/run-tests.py not using absolute_import
   tests/test-demandimport.py not using absolute_import
 
 #if py3exe
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs $PYTHON3 contrib/check-py3-compat.py
   doc/hgmanpage.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  hgext/acl.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/acl.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/automv.py: error importing module: <SyntaxError> invalid syntax (commands.py, line 3382) (line 30)
-  hgext/blackbox.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/blackbox.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/bugzilla.py: error importing module: <ImportError> No module named 'urlparse' (line 284)
-  hgext/censor.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/censor.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/chgserver.py: error importing module: <ImportError> No module named 'SocketServer' (line 43)
-  hgext/children.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/churn.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/clonebundles.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/children.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/churn.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/clonebundles.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   hgext/convert/bzr.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line 19)
   hgext/convert/common.py: error importing module: <ImportError> No module named 'cPickle' (line 10)
-  hgext/convert/convcmd.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/convert/cvs.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/convert/convcmd.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/convert/cvs.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/convert/cvsps.py: error importing module: <ImportError> No module named 'cPickle' (line 9)
-  hgext/convert/darcs.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/convert/darcs.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/convert/filemap.py: error importing module: <SystemError> Parent module 'hgext.convert' not loaded, cannot perform relative import (line 15)
-  hgext/convert/git.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/convert/gnuarch.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/convert/hg.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/convert/monotone.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/convert/p4.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/convert/git.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/convert/gnuarch.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/convert/hg.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/convert/monotone.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/convert/p4.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/convert/subversion.py: error importing module: <ImportError> No module named 'cPickle' (line 6)
   hgext/convert/transport.py: error importing module: <ImportError> No module named 'svn.client' (line 21)
-  hgext/eol.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/eol.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/extdiff.py: error importing module: <SyntaxError> invalid syntax (archival.py, line 234) (line 75)
-  hgext/factotum.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:47)
-  hgext/fetch.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/fsmonitor/state.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/fsmonitor/watchmanclient.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/gpg.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/graphlog.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/hgk.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/highlight/highlight.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/factotum.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob)
+  hgext/fetch.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/fsmonitor/state.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/fsmonitor/watchmanclient.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/gpg.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/graphlog.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/hgk.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/highlight/highlight.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/histedit.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line 992) (line 180)
-  hgext/keyword.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/largefiles/basestore.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/largefiles/lfcommands.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/largefiles/lfutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/keyword.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/largefiles/basestore.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/largefiles/lfcommands.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/largefiles/lfutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/largefiles/localstore.py: error importing module: <ImportError> No module named 'lfutil' (line 13)
-  hgext/largefiles/overrides.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/largefiles/overrides.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/largefiles/proto.py: error importing: <ImportError> No module named 'httplib' (error at httppeer.py:*) (glob)
-  hgext/largefiles/remotestore.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/largefiles/reposetup.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/largefiles/remotestore.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/largefiles/reposetup.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/largefiles/uisetup.py: error importing module: <SyntaxError> invalid syntax (archival.py, line *) (line *) (glob)
   hgext/largefiles/wirestore.py: error importing module: <ImportError> No module named 'lfutil' (line 8)
-  hgext/mq.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/notify.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/pager.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/patchbomb.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/purge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/rebase.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/record.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/relink.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/schemes.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/share.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/mq.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/notify.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/pager.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/patchbomb.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/purge.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/rebase.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/record.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/relink.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/schemes.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/share.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   hgext/shelve.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line 992) (line 30)
-  hgext/strip.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle2.py, line 992) (error at bundlerepo.py:23)
-  hgext/win32text.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  hgext/strip.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  hgext/transplant.py: error importing: <SyntaxError> invalid syntax (bundle2.py, line 992) (error at bundlerepo.py:*) (glob)
+  hgext/win32text.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
-  mercurial/bookmarks.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/branchmap.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  mercurial/bookmarks.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/branchmap.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/bundle*.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   mercurial/bundlerepo.py: error importing module: <SyntaxError> invalid syntax (bundle2.py, line 992) (line 23)
-  mercurial/byterange.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/changegroup.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/changelog.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:40)
-  mercurial/cmdutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  mercurial/byterange.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/changegroup.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/changelog.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/cmdutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *) (glob)
   mercurial/commandserver.py: error importing module: <ImportError> No module named 'SocketServer' (line 10)
-  mercurial/config.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/context.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/copies.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/crecord.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/destutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/dirstate.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/discovery.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/dispatch.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/exchange.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/extensions.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/filelog.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:40)
-  mercurial/filemerge.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:10)
-  mercurial/fileset.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  mercurial/config.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/context.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/copies.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/crecord.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/destutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/dirstate.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/discovery.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/dispatch.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/exchange.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/extensions.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/filelog.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/filemerge.py: error importing: <ImportError> No module named 'cPickle' (error at formatter.py:*) (glob)
+  mercurial/fileset.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/formatter.py: error importing module: <ImportError> No module named 'cPickle' (line 10)
-  mercurial/graphmod.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/help.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/hg.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
+  mercurial/graphmod.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/help.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/hg.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/hgweb/common.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line 11)
   mercurial/hgweb/hgweb_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 14)
   mercurial/hgweb/hgwebdir_mod.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 15)
   mercurial/hgweb/protocol.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 13)
   mercurial/hgweb/request.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 15)
   mercurial/hgweb/server.py: error importing module: <ImportError> No module named 'BaseHTTPServer' (line 11)
   mercurial/hgweb/webcommands.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 16)
   mercurial/hgweb/webutil.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 16)
   mercurial/hgweb/wsgicgi.py: error importing module: <SystemError> Parent module 'mercurial.hgweb' not loaded, cannot perform relative import (line 16)
-  mercurial/hook.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:81)
-  mercurial/httpconnection.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:47)
+  mercurial/hook.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/httpconnection.py: error importing: <ImportError> No module named 'rfc822' (error at __init__.py:*) (glob)
   mercurial/httppeer.py: error importing module: <ImportError> No module named 'httplib' (line 12)
   mercurial/keepalive.py: error importing module: <ImportError> No module named 'httplib' (line 113)
-  mercurial/localrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/lock.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/mail.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/localrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/lock.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/mail.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/manifest.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
-  mercurial/match.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/match.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/mdiff.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
-  mercurial/merge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/minirst.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/namespaces.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/merge.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/minirst.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/namespaces.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/obsolete.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
-  mercurial/patch.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/pathutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/peer.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/patch.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/pathutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/peer.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
   mercurial/pure/mpatch.py: error importing module: <ImportError> cannot import name 'pycompat' (line 12)
   mercurial/pure/parsers.py: error importing module: <ImportError> No module named 'mercurial.pure.node' (line 13)
-  mercurial/pushkey.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/pvec.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/registrar.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/pushkey.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/pvec.py: error importing: <TypeError> getattr(): attribute name must be string (error at pycompat.py:*) (glob)
+  mercurial/registrar.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
   mercurial/repair.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
-  mercurial/repoview.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/revlog.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/revset.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/scmposix.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/scmutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/repoview.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/revlog.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/revset.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/scmutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
   mercurial/scmwindows.py: error importing module: <ImportError> No module named '_winreg' (line 3)
-  mercurial/similar.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/simplemerge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/sshpeer.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/sshserver.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/sslutil.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/statichttprepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/store.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/streamclone.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/subrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/tagmerge.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/tags.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/templatefilters.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/templatekw.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/templater.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/transaction.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/ui.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/unionrepo.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/similar.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/simplemerge.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/sshpeer.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/sshserver.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/sslutil.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/statichttprepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/store.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/streamclone.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/subrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/tagmerge.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/tags.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/templatefilters.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/templatekw.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/templater.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/transaction.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/ui.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
+  mercurial/unionrepo.py: error importing: <TypeError> getattr(): attribute name must be string (error at util.py:*) (glob)
   mercurial/url.py: error importing module: <ImportError> No module named 'httplib' (line 13)
-  mercurial/util.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
-  mercurial/verify.py: error importing: <TypeError> '_fields_' must be a sequence of (name, C type) pairs (error at osutil.py:*) (glob)
+  mercurial/verify.py: error importing: <TypeError> __slots__ items must be strings, not 'bytes' (error at mdiff.py:*) (glob)
   mercurial/win32.py: error importing module: <ImportError> No module named 'msvcrt' (line 12)
   mercurial/windows.py: error importing module: <ImportError> No module named '_winreg' (line 10)
   mercurial/wireproto.py: error importing module: <SyntaxError> invalid syntax (bundle*.py, line *) (line *) (glob)
 
 #endif


More information about the Mercurial-devel mailing list