# HG changeset patch # User Gregory Szorc # Date 1570395318 14400 # Node ID c59eb1560c444ec4b25525ef283d142de5733f30 # Parent 0d612db7047cf147c4c70d3999a083bab8d08621 py3: manually import getattr where it is needed The march continues. Differential Revision: https://phab.mercurial-scm.org/D7009 diff -r 0d612db7047c -r c59eb1560c44 hgext/convert/cvs.py --- a/hgext/convert/cvs.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/convert/cvs.py Sun Oct 06 16:55:18 2019 -0400 @@ -12,7 +12,10 @@ import socket from mercurial.i18n import _ -from mercurial.pycompat import open +from mercurial.pycompat import ( + getattr, + open, +) from mercurial import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 hgext/convert/transport.py --- a/hgext/convert/transport.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/convert/transport.py Sun Oct 06 16:55:18 2019 -0400 @@ -25,6 +25,7 @@ Pool = svn.core.Pool SubversionException = svn.core.SubversionException +from mercurial.pycompat import getattr from mercurial import util # Some older versions of the Python bindings need to be diff -r 0d612db7047c -r c59eb1560c44 hgext/fastannotate/context.py --- a/hgext/fastannotate/context.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/fastannotate/context.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,6 +14,7 @@ from mercurial.i18n import _ from mercurial.pycompat import ( + getattr, open, setattr, ) diff -r 0d612db7047c -r c59eb1560c44 hgext/fastannotate/support.py --- a/hgext/fastannotate/support.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/fastannotate/support.py Sun Oct 06 16:55:18 2019 -0400 @@ -7,6 +7,7 @@ from __future__ import absolute_import +from mercurial.pycompat import getattr from mercurial import ( context as hgcontext, dagop, diff -r 0d612db7047c -r c59eb1560c44 hgext/histedit.py --- a/hgext/histedit.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/histedit.py Sun Oct 06 16:55:18 2019 -0400 @@ -206,7 +206,10 @@ import struct from mercurial.i18n import _ -from mercurial.pycompat import open +from mercurial.pycompat import ( + getattr, + open, +) from mercurial import ( bundle2, cmdutil, diff -r 0d612db7047c -r c59eb1560c44 hgext/infinitepush/__init__.py --- a/hgext/infinitepush/__init__.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/infinitepush/__init__.py Sun Oct 06 16:55:18 2019 -0400 @@ -103,7 +103,10 @@ from mercurial.i18n import _ -from mercurial.pycompat import open +from mercurial.pycompat import ( + getattr, + open, +) from mercurial.utils import ( procutil, diff -r 0d612db7047c -r c59eb1560c44 hgext/keyword.py --- a/hgext/keyword.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/keyword.py Sun Oct 06 16:55:18 2019 -0400 @@ -90,6 +90,7 @@ import weakref from mercurial.i18n import _ +from mercurial.pycompat import getattr from mercurial.hgweb import webcommands from mercurial import ( diff -r 0d612db7047c -r c59eb1560c44 hgext/largefiles/storefactory.py --- a/hgext/largefiles/storefactory.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/largefiles/storefactory.py Sun Oct 06 16:55:18 2019 -0400 @@ -6,7 +6,7 @@ import re from mercurial.i18n import _ - +from mercurial.pycompat import getattr from mercurial import ( error, hg, diff -r 0d612db7047c -r c59eb1560c44 hgext/lfs/blobstore.py --- a/hgext/lfs/blobstore.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/lfs/blobstore.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ import socket from mercurial.i18n import _ +from mercurial.pycompat import getattr from mercurial import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 hgext/lfs/wrapper.py --- a/hgext/lfs/wrapper.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/lfs/wrapper.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,7 +11,10 @@ from mercurial.i18n import _ from mercurial.node import bin, hex, nullid, short -from mercurial.pycompat import setattr +from mercurial.pycompat import ( + getattr, + setattr, +) from mercurial import ( bundle2, diff -r 0d612db7047c -r c59eb1560c44 hgext/mq.py --- a/hgext/mq.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/mq.py Sun Oct 06 16:55:18 2019 -0400 @@ -76,7 +76,10 @@ nullrev, short, ) -from mercurial.pycompat import open +from mercurial.pycompat import ( + getattr, + open, +) from mercurial import ( cmdutil, commands, diff -r 0d612db7047c -r c59eb1560c44 hgext/phabricator.py --- a/hgext/phabricator.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/phabricator.py Sun Oct 06 16:55:18 2019 -0400 @@ -49,6 +49,7 @@ from mercurial.node import bin, nullid from mercurial.i18n import _ +from mercurial.pycompat import getattr from mercurial import ( cmdutil, context, diff -r 0d612db7047c -r c59eb1560c44 hgext/remotefilelog/basepack.py --- a/hgext/remotefilelog/basepack.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/remotefilelog/basepack.py Sun Oct 06 16:55:18 2019 -0400 @@ -9,7 +9,10 @@ import time from mercurial.i18n import _ -from mercurial.pycompat import open +from mercurial.pycompat import ( + getattr, + open, +) from mercurial import ( node as nodemod, policy, diff -r 0d612db7047c -r c59eb1560c44 hgext/remotefilelog/contentstore.py --- a/hgext/remotefilelog/contentstore.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/remotefilelog/contentstore.py Sun Oct 06 16:55:18 2019 -0400 @@ -3,6 +3,7 @@ import threading from mercurial.node import hex, nullid +from mercurial.pycompat import getattr from mercurial import ( mdiff, pycompat, diff -r 0d612db7047c -r c59eb1560c44 hgext/strip.py --- a/hgext/strip.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/strip.py Sun Oct 06 16:55:18 2019 -0400 @@ -6,6 +6,7 @@ from __future__ import absolute_import from mercurial.i18n import _ +from mercurial.pycompat import getattr from mercurial import ( bookmarks as bookmarksmod, cmdutil, diff -r 0d612db7047c -r c59eb1560c44 hgext/win32mbcs.py --- a/hgext/win32mbcs.py Sun Oct 06 16:39:13 2019 -0400 +++ b/hgext/win32mbcs.py Sun Oct 06 16:55:18 2019 -0400 @@ -50,7 +50,7 @@ import sys from mercurial.i18n import _ -from mercurial.pycompat import setattr +from mercurial.pycompat import getattr, setattr from mercurial import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/__init__.py --- a/mercurial/__init__.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/__init__.py Sun Oct 06 16:55:18 2019 -0400 @@ -171,7 +171,7 @@ r, c = t.start l = ( b'; from mercurial.pycompat import ' - b'delattr, getattr\n' + b'delattr\n' ) for u in tokenize.tokenize(io.BytesIO(l).readline): if u.type in (tokenize.ENCODING, token.ENDMARKER): @@ -220,7 +220,7 @@ # ``replacetoken`` or any mechanism that changes semantics of module # loading is changed. Otherwise cached bytecode may get loaded without # the new transformation mechanisms applied. - BYTECODEHEADER = b'HG\x00\x10' + BYTECODEHEADER = b'HG\x00\x11' class hgloader(importlib.machinery.SourceFileLoader): """Custom module loader that transforms source code. diff -r 0d612db7047c -r c59eb1560c44 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/bookmarks.py Sun Oct 06 16:55:18 2019 -0400 @@ -17,6 +17,7 @@ short, wdirid, ) +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/chgserver.py --- a/mercurial/chgserver.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/chgserver.py Sun Oct 06 16:55:18 2019 -0400 @@ -51,7 +51,10 @@ import time from .i18n import _ -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( commandserver, diff -r 0d612db7047c -r c59eb1560c44 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/cmdutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -20,6 +20,7 @@ short, ) from .pycompat import ( + getattr, open, setattr, ) diff -r 0d612db7047c -r c59eb1560c44 mercurial/color.py --- a/mercurial/color.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/color.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ import re from .i18n import _ +from .pycompat import getattr from . import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/commandserver.py --- a/mercurial/commandserver.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/commandserver.py Sun Oct 06 16:55:18 2019 -0400 @@ -24,6 +24,7 @@ from .thirdparty import selectors2 as selectors from .i18n import _ +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/config.py --- a/mercurial/config.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/config.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import os from .i18n import _ +from .pycompat import getattr from . import ( error, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/context.py --- a/mercurial/context.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/context.py Sun Oct 06 16:55:18 2019 -0400 @@ -23,7 +23,10 @@ wdirfilenodeids, wdirhex, ) -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( copies, dagop, diff -r 0d612db7047c -r c59eb1560c44 mercurial/crecord.py --- a/mercurial/crecord.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/crecord.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,7 +16,10 @@ import signal from .i18n import _ -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/debugcommands.py Sun Oct 06 16:55:18 2019 -0400 @@ -32,7 +32,10 @@ nullrev, short, ) -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( bundle2, changegroup, diff -r 0d612db7047c -r c59eb1560c44 mercurial/dispatch.py --- a/mercurial/dispatch.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/dispatch.py Sun Oct 06 16:55:18 2019 -0400 @@ -20,6 +20,7 @@ from .i18n import _ +from .pycompat import getattr from hgdemandimport import tracing diff -r 0d612db7047c -r c59eb1560c44 mercurial/encoding.py --- a/mercurial/encoding.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/encoding.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import os import unicodedata +from .pycompat import getattr from . import ( error, policy, diff -r 0d612db7047c -r c59eb1560c44 mercurial/extensions.py --- a/mercurial/extensions.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/extensions.py Sun Oct 06 16:55:18 2019 -0400 @@ -19,6 +19,7 @@ gettext, ) from .pycompat import ( + getattr, open, setattr, ) diff -r 0d612db7047c -r c59eb1560c44 mercurial/filemerge.py --- a/mercurial/filemerge.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/filemerge.py Sun Oct 06 16:55:18 2019 -0400 @@ -18,7 +18,10 @@ nullid, short, ) -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/fileset.py --- a/mercurial/fileset.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/fileset.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import re from .i18n import _ +from .pycompat import getattr from . import ( error, filesetlang, diff -r 0d612db7047c -r c59eb1560c44 mercurial/filesetlang.py --- a/mercurial/filesetlang.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/filesetlang.py Sun Oct 06 16:55:18 2019 -0400 @@ -8,6 +8,7 @@ from __future__ import absolute_import from .i18n import _ +from .pycompat import getattr from . import ( error, parser, diff -r 0d612db7047c -r c59eb1560c44 mercurial/help.py --- a/mercurial/help.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/help.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ _, gettext, ) +from .pycompat import getattr from . import ( cmdutil, encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hg.py --- a/mercurial/hg.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hg.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ from .i18n import _ from .node import nullid +from .pycompat import getattr from . import ( bookmarks, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hgweb/common.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,7 +14,10 @@ import os import stat -from ..pycompat import open +from ..pycompat import ( + getattr, + open, +) from .. import ( encoding, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hgweb/hgweb_mod.py Sun Oct 06 16:55:18 2019 -0400 @@ -18,6 +18,7 @@ permhooks, statusmessage, ) +from ..pycompat import getattr from .. import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hgweb/server.py Sun Oct 06 16:55:18 2019 -0400 @@ -17,7 +17,10 @@ import wsgiref.validate from ..i18n import _ -from ..pycompat import open +from ..pycompat import ( + getattr, + open, +) from .. import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hgweb/webcommands.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,6 +14,7 @@ from ..i18n import _ from ..node import hex, short +from ..pycompat import getattr from .common import ( ErrorResponse, diff -r 0d612db7047c -r c59eb1560c44 mercurial/hgweb/wsgicgi.py --- a/mercurial/hgweb/wsgicgi.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hgweb/wsgicgi.py Sun Oct 06 16:55:18 2019 -0400 @@ -12,6 +12,7 @@ import os +from ..pycompat import getattr from .. import pycompat from ..utils import procutil diff -r 0d612db7047c -r c59eb1560c44 mercurial/hook.py --- a/mercurial/hook.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/hook.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import sys from .i18n import _ +from .pycompat import getattr from . import ( demandimport, encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/httppeer.py --- a/mercurial/httppeer.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/httppeer.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ import weakref from .i18n import _ +from .pycompat import getattr from . import ( bundle2, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/i18n.py --- a/mercurial/i18n.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/i18n.py Sun Oct 06 16:55:18 2019 -0400 @@ -12,6 +12,7 @@ import os import sys +from .pycompat import getattr from . import ( encoding, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/keepalive.py --- a/mercurial/keepalive.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/keepalive.py Sun Oct 06 16:55:18 2019 -0400 @@ -92,6 +92,7 @@ import threading from .i18n import _ +from .pycompat import getattr from . import ( node, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/localrepo.py --- a/mercurial/localrepo.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/localrepo.py Sun Oct 06 16:55:18 2019 -0400 @@ -23,6 +23,7 @@ nullrev, short, ) +from .pycompat import getattr from . import ( bookmarks, branchmap, diff -r 0d612db7047c -r c59eb1560c44 mercurial/lock.py --- a/mercurial/lock.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/lock.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ import warnings from .i18n import _ +from .pycompat import getattr from . import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/lsprof.py --- a/mercurial/lsprof.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/lsprof.py Sun Oct 06 16:55:18 2019 -0400 @@ -3,6 +3,8 @@ import _lsprof import sys +from .pycompat import getattr + Profiler = _lsprof.Profiler # PyPy doesn't expose profiler_entry from the module. diff -r 0d612db7047c -r c59eb1560c44 mercurial/mail.py --- a/mercurial/mail.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/mail.py Sun Oct 06 16:55:18 2019 -0400 @@ -19,7 +19,10 @@ import time from .i18n import _ -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/manifest.py --- a/mercurial/manifest.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/manifest.py Sun Oct 06 16:55:18 2019 -0400 @@ -19,6 +19,7 @@ nullid, nullrev, ) +from .pycompat import getattr from . import ( error, mdiff, diff -r 0d612db7047c -r c59eb1560c44 mercurial/mdiff.py --- a/mercurial/mdiff.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/mdiff.py Sun Oct 06 16:55:18 2019 -0400 @@ -12,7 +12,10 @@ import zlib from .i18n import _ -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/narrowspec.py --- a/mercurial/narrowspec.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/narrowspec.py Sun Oct 06 16:55:18 2019 -0400 @@ -8,6 +8,7 @@ from __future__ import absolute_import from .i18n import _ +from .pycompat import getattr from .interfaces import repository from . import ( error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/obsolete.py --- a/mercurial/obsolete.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/obsolete.py Sun Oct 06 16:55:18 2019 -0400 @@ -74,6 +74,7 @@ import struct from .i18n import _ +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/phases.py --- a/mercurial/phases.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/phases.py Sun Oct 06 16:55:18 2019 -0400 @@ -113,7 +113,10 @@ nullrev, short, ) -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( error, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/policy.py --- a/mercurial/policy.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/policy.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,8 @@ import os import sys +from .pycompat import getattr + # Rules for how modules can be loaded. Values are: # # c - require C extensions diff -r 0d612db7047c -r c59eb1560c44 mercurial/posix.py --- a/mercurial/posix.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/posix.py Sun Oct 06 16:55:18 2019 -0400 @@ -21,7 +21,10 @@ import unicodedata from .i18n import _ -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/profiling.py --- a/mercurial/profiling.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/profiling.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,7 +10,10 @@ import contextlib from .i18n import _ -from .pycompat import open +from .pycompat import ( + getattr, + open, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/pure/osutil.py --- a/mercurial/pure/osutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/pure/osutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -13,6 +13,7 @@ import socket import stat as statmod +from ..pycompat import getattr from .. import ( encoding, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/pycompat.py --- a/mercurial/pycompat.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/pycompat.py Sun Oct 06 16:55:18 2019 -0400 @@ -355,6 +355,7 @@ strurl = identity bytesurl = identity open = open + getattr = getattr hasattr = hasattr setattr = setattr diff -r 0d612db7047c -r c59eb1560c44 mercurial/repoview.py --- a/mercurial/repoview.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/repoview.py Sun Oct 06 16:55:18 2019 -0400 @@ -12,7 +12,10 @@ import weakref from .node import nullrev -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( obsolete, phases, diff -r 0d612db7047c -r c59eb1560c44 mercurial/revlog.py --- a/mercurial/revlog.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/revlog.py Sun Oct 06 16:55:18 2019 -0400 @@ -35,6 +35,7 @@ wdirrev, ) from .i18n import _ +from .pycompat import getattr from .revlogutils.constants import ( FLAG_GENERALDELTA, FLAG_INLINE_DATA, diff -r 0d612db7047c -r c59eb1560c44 mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/revlogutils/deltas.py Sun Oct 06 16:55:18 2019 -0400 @@ -15,6 +15,7 @@ # import stuff from node for others to import from revlog from ..node import nullrev from ..i18n import _ +from ..pycompat import getattr from .constants import ( REVIDX_ISCENSORED, diff -r 0d612db7047c -r c59eb1560c44 mercurial/revset.py --- a/mercurial/revset.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/revset.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ import re from .i18n import _ +from .pycompat import getattr from . import ( dagop, destutil, diff -r 0d612db7047c -r c59eb1560c44 mercurial/revsetlang.py --- a/mercurial/revsetlang.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/revsetlang.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ import string from .i18n import _ +from .pycompat import getattr from . import ( error, node, diff -r 0d612db7047c -r c59eb1560c44 mercurial/scmposix.py --- a/mercurial/scmposix.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/scmposix.py Sun Oct 06 16:55:18 2019 -0400 @@ -6,6 +6,7 @@ import os import sys +from .pycompat import getattr from . import ( encoding, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/scmutil.py --- a/mercurial/scmutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/scmutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -26,6 +26,7 @@ wdirid, wdirrev, ) +from .pycompat import getattr from . import ( copies as copiesmod, diff -r 0d612db7047c -r c59eb1560c44 mercurial/smartset.py --- a/mercurial/smartset.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/smartset.py Sun Oct 06 16:55:18 2019 -0400 @@ -7,6 +7,7 @@ from __future__ import absolute_import +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/sshpeer.py --- a/mercurial/sshpeer.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/sshpeer.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import uuid from .i18n import _ +from .pycompat import getattr from . import ( error, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/sslutil.py --- a/mercurial/sslutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/sslutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -15,6 +15,7 @@ import ssl from .i18n import _ +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/store.py --- a/mercurial/store.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/store.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,6 +14,7 @@ import stat from .i18n import _ +from .pycompat import getattr from . import ( changelog, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/subrepoutil.py --- a/mercurial/subrepoutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/subrepoutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -13,6 +13,7 @@ import re from .i18n import _ +from .pycompat import getattr from . import ( config, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/templater.py --- a/mercurial/templater.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/templater.py Sun Oct 06 16:55:18 2019 -0400 @@ -68,6 +68,7 @@ import os from .i18n import _ +from .pycompat import getattr from . import ( config, encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/templateutil.py --- a/mercurial/templateutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/templateutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -11,6 +11,7 @@ import types from .i18n import _ +from .pycompat import getattr from . import ( error, pycompat, diff -r 0d612db7047c -r c59eb1560c44 mercurial/testing/storage.py --- a/mercurial/testing/storage.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/testing/storage.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,6 +14,7 @@ nullid, nullrev, ) +from ..pycompat import getattr from .. import ( error, mdiff, diff -r 0d612db7047c -r c59eb1560c44 mercurial/ui.py --- a/mercurial/ui.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/ui.py Sun Oct 06 16:55:18 2019 -0400 @@ -23,6 +23,7 @@ from .i18n import _ from .node import hex from .pycompat import ( + getattr, open, setattr, ) diff -r 0d612db7047c -r c59eb1560c44 mercurial/unionrepo.py --- a/mercurial/unionrepo.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/unionrepo.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,6 +14,7 @@ from __future__ import absolute_import from .i18n import _ +from .pycompat import getattr from . import ( changelog, diff -r 0d612db7047c -r c59eb1560c44 mercurial/upgrade.py --- a/mercurial/upgrade.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/upgrade.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ import stat from .i18n import _ +from .pycompat import getattr from . import ( changelog, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/url.py --- a/mercurial/url.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/url.py Sun Oct 06 16:55:18 2019 -0400 @@ -15,6 +15,7 @@ import sys from .i18n import _ +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/urllibcompat.py --- a/mercurial/urllibcompat.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/urllibcompat.py Sun Oct 06 16:55:18 2019 -0400 @@ -6,6 +6,7 @@ # GNU General Public License version 2 or any later version. from __future__ import absolute_import +from .pycompat import getattr from . import pycompat _sysstr = pycompat.sysstr diff -r 0d612db7047c -r c59eb1560c44 mercurial/util.py --- a/mercurial/util.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/util.py Sun Oct 06 16:55:18 2019 -0400 @@ -36,6 +36,7 @@ from .thirdparty import attr from .pycompat import ( + getattr, open, setattr, ) diff -r 0d612db7047c -r c59eb1560c44 mercurial/utils/compression.py --- a/mercurial/utils/compression.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/utils/compression.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ import collections import zlib +from ..pycompat import getattr from .. import ( error, i18n, diff -r 0d612db7047c -r c59eb1560c44 mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/utils/procutil.py Sun Oct 06 16:55:18 2019 -0400 @@ -20,7 +20,10 @@ import time from ..i18n import _ -from ..pycompat import open +from ..pycompat import ( + getattr, + open, +) from .. import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/vfs.py --- a/mercurial/vfs.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/vfs.py Sun Oct 06 16:55:18 2019 -0400 @@ -14,7 +14,10 @@ import threading from .i18n import _ -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/windows.py --- a/mercurial/windows.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/windows.py Sun Oct 06 16:55:18 2019 -0400 @@ -16,6 +16,7 @@ import sys from .i18n import _ +from .pycompat import getattr from . import ( encoding, error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/wireprotoframing.py --- a/mercurial/wireprotoframing.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/wireprotoframing.py Sun Oct 06 16:55:18 2019 -0400 @@ -15,6 +15,7 @@ import struct from .i18n import _ +from .pycompat import getattr from .thirdparty import attr from . import ( encoding, diff -r 0d612db7047c -r c59eb1560c44 mercurial/wireprototypes.py --- a/mercurial/wireprototypes.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/wireprototypes.py Sun Oct 06 16:55:18 2019 -0400 @@ -10,6 +10,7 @@ hex, ) from .i18n import _ +from .pycompat import getattr from .thirdparty import attr from . import ( error, diff -r 0d612db7047c -r c59eb1560c44 mercurial/wireprotov1peer.py --- a/mercurial/wireprotov1peer.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/wireprotov1peer.py Sun Oct 06 16:55:18 2019 -0400 @@ -13,7 +13,10 @@ from .i18n import _ from .node import bin -from .pycompat import setattr +from .pycompat import ( + getattr, + setattr, +) from . import ( bundle2, changegroup as changegroupmod, diff -r 0d612db7047c -r c59eb1560c44 mercurial/wireprotov1server.py --- a/mercurial/wireprotov1server.py Sun Oct 06 16:39:13 2019 -0400 +++ b/mercurial/wireprotov1server.py Sun Oct 06 16:55:18 2019 -0400 @@ -15,6 +15,7 @@ hex, nullid, ) +from .pycompat import getattr from . import ( bundle2,