# HG changeset patch # User Pierre-Yves David # Date 1693519795 -7200 # Node ID 18c8c18993f01582568c79e49834474cb4728bf6 # Parent d718eddf01d966c67120b51591bebf87581772ed pycompat: drop usage of hasattr/getattr/setattr/delatt proxy The function remains to ease extensions transition, but we no longer use them in core. diff -r d718eddf01d9 -r 18c8c18993f0 hgext/convert/cvs.py --- a/hgext/convert/cvs.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/convert/cvs.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,7 +12,6 @@ from mercurial.i18n import _ from mercurial.pycompat import ( - getattr, open, ) from mercurial import ( diff -r d718eddf01d9 -r 18c8c18993f0 hgext/convert/transport.py --- a/hgext/convert/transport.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/convert/transport.py Fri Sep 01 00:09:55 2023 +0200 @@ -27,8 +27,6 @@ Pool = svn.core.Pool SubversionException = svn.core.SubversionException -from mercurial.pycompat import getattr - # Some older versions of the Python bindings need to be # explicitly initialized. But what we want to do probably # won't work worth a darn against those libraries anyway! diff -r d718eddf01d9 -r 18c8c18993f0 hgext/factotum.py --- a/hgext/factotum.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/factotum.py Fri Sep 01 00:09:55 2023 +0200 @@ -48,7 +48,6 @@ import os from mercurial.i18n import _ -from mercurial.pycompat import setattr from mercurial.utils import procutil from mercurial import ( error, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/fastannotate/context.py --- a/hgext/fastannotate/context.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/fastannotate/context.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,9 +12,7 @@ from mercurial.i18n import _ from mercurial.pycompat import ( - getattr, open, - setattr, ) from mercurial.node import ( bin, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/fastannotate/support.py --- a/hgext/fastannotate/support.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/fastannotate/support.py Fri Sep 01 00:09:55 2023 +0200 @@ -6,7 +6,6 @@ # GNU General Public License version 2 or any later version. -from mercurial.pycompat import getattr from mercurial import ( context as hgcontext, dagop, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/histedit.py --- a/hgext/histedit.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/histedit.py Fri Sep 01 00:09:55 2023 +0200 @@ -207,7 +207,6 @@ from mercurial.i18n import _ from mercurial.pycompat import ( - getattr, open, ) from mercurial.node import ( diff -r d718eddf01d9 -r 18c8c18993f0 hgext/keyword.py --- a/hgext/keyword.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/keyword.py Fri Sep 01 00:09:55 2023 +0200 @@ -88,7 +88,6 @@ import weakref from mercurial.i18n import _ -from mercurial.pycompat import getattr from mercurial.hgweb import webcommands from mercurial import ( diff -r d718eddf01d9 -r 18c8c18993f0 hgext/largefiles/storefactory.py --- a/hgext/largefiles/storefactory.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/largefiles/storefactory.py Fri Sep 01 00:09:55 2023 +0200 @@ -5,7 +5,6 @@ import re from mercurial.i18n import _ -from mercurial.pycompat import getattr from mercurial import ( error, hg, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/lfs/blobstore.py --- a/hgext/lfs/blobstore.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/lfs/blobstore.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ import socket from mercurial.i18n import _ -from mercurial.pycompat import getattr from mercurial.node import hex from mercurial import ( diff -r d718eddf01d9 -r 18c8c18993f0 hgext/lfs/wrapper.py --- a/hgext/lfs/wrapper.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/lfs/wrapper.py Fri Sep 01 00:09:55 2023 +0200 @@ -10,10 +10,6 @@ from mercurial.i18n import _ from mercurial.node import bin, hex, short -from mercurial.pycompat import ( - getattr, - setattr, -) from mercurial import ( bundle2, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/mq.py --- a/hgext/mq.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/mq.py Fri Sep 01 00:09:55 2023 +0200 @@ -75,8 +75,6 @@ short, ) from mercurial.pycompat import ( - delattr, - getattr, open, ) from mercurial import ( diff -r d718eddf01d9 -r 18c8c18993f0 hgext/phabricator.py --- a/hgext/phabricator.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/phabricator.py Fri Sep 01 00:09:55 2023 +0200 @@ -71,7 +71,6 @@ from mercurial.node import bin, short from mercurial.i18n import _ -from mercurial.pycompat import getattr from mercurial.thirdparty import attr from mercurial import ( cmdutil, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/remotefilelog/basepack.py --- a/hgext/remotefilelog/basepack.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/remotefilelog/basepack.py Fri Sep 01 00:09:55 2023 +0200 @@ -7,7 +7,6 @@ from mercurial.i18n import _ from mercurial.pycompat import ( - getattr, open, ) from mercurial.node import hex diff -r d718eddf01d9 -r 18c8c18993f0 hgext/remotefilelog/contentstore.py --- a/hgext/remotefilelog/contentstore.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/remotefilelog/contentstore.py Fri Sep 01 00:09:55 2023 +0200 @@ -4,7 +4,6 @@ hex, sha1nodeconstants, ) -from mercurial.pycompat import getattr from mercurial import ( mdiff, revlog, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/sparse.py --- a/hgext/sparse.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/sparse.py Fri Sep 01 00:09:55 2023 +0200 @@ -73,7 +73,6 @@ from mercurial.i18n import _ -from mercurial.pycompat import setattr from mercurial import ( cmdutil, commands, diff -r d718eddf01d9 -r 18c8c18993f0 hgext/win32mbcs.py --- a/hgext/win32mbcs.py Thu Aug 31 23:56:15 2023 +0200 +++ b/hgext/win32mbcs.py Fri Sep 01 00:09:55 2023 +0200 @@ -49,7 +49,6 @@ import sys from mercurial.i18n import _ -from mercurial.pycompat import getattr, setattr from mercurial import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/bookmarks.py --- a/mercurial/bookmarks.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/bookmarks.py Fri Sep 01 00:09:55 2023 +0200 @@ -14,7 +14,6 @@ hex, short, ) -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/chgserver.py --- a/mercurial/chgserver.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/chgserver.py Fri Sep 01 00:09:55 2023 +0200 @@ -49,10 +49,6 @@ import time from .i18n import _ -from .pycompat import ( - getattr, - setattr, -) from .node import hex from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/cmdutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -28,9 +28,7 @@ short, ) from .pycompat import ( - getattr, open, - setattr, ) from .thirdparty import attr diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/color.py --- a/mercurial/color.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/color.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ import re from .i18n import _ -from .pycompat import getattr from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/commandserver.py --- a/mercurial/commandserver.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/commandserver.py Fri Sep 01 00:09:55 2023 +0200 @@ -16,7 +16,6 @@ import traceback from .i18n import _ -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/config.py --- a/mercurial/config.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/config.py Fri Sep 01 00:09:55 2023 +0200 @@ -10,7 +10,6 @@ import os from .i18n import _ -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/context.py --- a/mercurial/context.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/context.py Fri Sep 01 00:09:55 2023 +0200 @@ -16,9 +16,6 @@ nullrev, short, ) -from .pycompat import ( - getattr, -) from . import ( dagop, encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/crecord.py --- a/mercurial/crecord.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/crecord.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ from .i18n import _ from .pycompat import ( - getattr, open, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/debugcommands.py Fri Sep 01 00:09:55 2023 +0200 @@ -33,7 +33,6 @@ short, ) from .pycompat import ( - getattr, open, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/dirstate.py --- a/mercurial/dirstate.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/dirstate.py Fri Sep 01 00:09:55 2023 +0200 @@ -13,7 +13,6 @@ import uuid from .i18n import _ -from .pycompat import delattr from hgdemandimport import tracing diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/dispatch.py --- a/mercurial/dispatch.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/dispatch.py Fri Sep 01 00:09:55 2023 +0200 @@ -18,7 +18,6 @@ from .i18n import _ -from .pycompat import getattr from hgdemandimport import tracing diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/encoding.py --- a/mercurial/encoding.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/encoding.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import re import unicodedata -from .pycompat import getattr from . import ( error, policy, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/extensions.py --- a/mercurial/extensions.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/extensions.py Fri Sep 01 00:09:55 2023 +0200 @@ -19,9 +19,7 @@ gettext, ) from .pycompat import ( - getattr, open, - setattr, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/filemerge.py --- a/mercurial/filemerge.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/filemerge.py Fri Sep 01 00:09:55 2023 +0200 @@ -16,9 +16,6 @@ hex, short, ) -from .pycompat import ( - getattr, -) from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/fileset.py --- a/mercurial/fileset.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/fileset.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ import re from .i18n import _ -from .pycompat import getattr from . import ( error, filesetlang, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/filesetlang.py --- a/mercurial/filesetlang.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/filesetlang.py Fri Sep 01 00:09:55 2023 +0200 @@ -7,7 +7,6 @@ from .i18n import _ -from .pycompat import getattr from . import ( error, parser, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/help.py --- a/mercurial/help.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/help.py Fri Sep 01 00:09:55 2023 +0200 @@ -26,7 +26,6 @@ _, gettext, ) -from .pycompat import getattr from . import ( cmdutil, encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hg.py --- a/mercurial/hg.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hg.py Fri Sep 01 00:09:55 2023 +0200 @@ -19,7 +19,6 @@ sha1nodeconstants, short, ) -from .pycompat import getattr from . import ( bookmarks, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/common.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ from ..i18n import _ from ..pycompat import ( - getattr, open, ) from .. import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/hgweb_mod.py Fri Sep 01 00:09:55 2023 +0200 @@ -17,7 +17,6 @@ permhooks, statusmessage, ) -from ..pycompat import getattr from .. import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/server.py Fri Sep 01 00:09:55 2023 +0200 @@ -16,7 +16,6 @@ from ..i18n import _ from ..pycompat import ( - getattr, open, ) diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/webcommands.py Fri Sep 01 00:09:55 2023 +0200 @@ -13,7 +13,6 @@ from ..i18n import _ from ..node import hex, short -from ..pycompat import getattr from .common import ( ErrorResponse, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/webutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -14,7 +14,6 @@ from ..i18n import _ from ..node import hex, short -from ..pycompat import setattr from .common import ( ErrorResponse, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hgweb/wsgicgi.py --- a/mercurial/hgweb/wsgicgi.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hgweb/wsgicgi.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import os -from ..pycompat import getattr from .. import pycompat from ..utils import procutil diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/hook.py --- a/mercurial/hook.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/hook.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,7 +12,6 @@ import sys from .i18n import _ -from .pycompat import getattr from . import ( demandimport, encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/httppeer.py --- a/mercurial/httppeer.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/httppeer.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ from concurrent import futures from .i18n import _ -from .pycompat import getattr from . import ( bundle2, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/i18n.py --- a/mercurial/i18n.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/i18n.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import os import sys -from .pycompat import getattr from .utils import resourceutil from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/keepalive.py --- a/mercurial/keepalive.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/keepalive.py Fri Sep 01 00:09:55 2023 +0200 @@ -90,7 +90,6 @@ import threading from .i18n import _ -from .pycompat import getattr from .node import hex from . import ( pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/localrepo.py Fri Sep 01 00:09:55 2023 +0200 @@ -28,10 +28,6 @@ sha1nodeconstants, short, ) -from .pycompat import ( - delattr, - getattr, -) from . import ( bookmarks, branchmap, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/lock.py --- a/mercurial/lock.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/lock.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ import warnings from .i18n import _ -from .pycompat import getattr from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/lsprof.py --- a/mercurial/lsprof.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/lsprof.py Fri Sep 01 00:09:55 2023 +0200 @@ -1,8 +1,6 @@ import _lsprof import sys -from .pycompat import getattr - Profiler = _lsprof.Profiler # PyPy doesn't expose profiler_entry from the module. diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/mail.py --- a/mercurial/mail.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/mail.py Fri Sep 01 00:09:55 2023 +0200 @@ -20,7 +20,6 @@ from .i18n import _ from .pycompat import ( - getattr, open, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/manifest.py --- a/mercurial/manifest.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/manifest.py Fri Sep 01 00:09:55 2023 +0200 @@ -17,7 +17,6 @@ hex, nullrev, ) -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/mdiff.py --- a/mercurial/mdiff.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/mdiff.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,10 +11,6 @@ import zlib from .i18n import _ -from .pycompat import ( - getattr, - setattr, -) from . import ( diffhelper, encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/narrowspec.py --- a/mercurial/narrowspec.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/narrowspec.py Fri Sep 01 00:09:55 2023 +0200 @@ -8,7 +8,6 @@ import weakref from .i18n import _ -from .pycompat import getattr from . import ( error, match as matchmod, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/obsolete.py --- a/mercurial/obsolete.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/obsolete.py Fri Sep 01 00:09:55 2023 +0200 @@ -73,7 +73,6 @@ import weakref from .i18n import _ -from .pycompat import getattr from .node import ( bin, hex, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/phases.py --- a/mercurial/phases.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/phases.py Fri Sep 01 00:09:55 2023 +0200 @@ -111,10 +111,6 @@ short, wdirrev, ) -from .pycompat import ( - getattr, - setattr, -) from . import ( error, pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/policy.py --- a/mercurial/policy.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/policy.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,8 +9,6 @@ import os import sys -from .pycompat import getattr - # Rules for how modules can be loaded. Values are: # # c - require C extensions diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/posix.py --- a/mercurial/posix.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/posix.py Fri Sep 01 00:09:55 2023 +0200 @@ -36,7 +36,6 @@ from .i18n import _ from .pycompat import ( - getattr, open, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/profiling.py --- a/mercurial/profiling.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/profiling.py Fri Sep 01 00:09:55 2023 +0200 @@ -10,7 +10,6 @@ from .i18n import _ from .pycompat import ( - getattr, open, ) from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/pure/osutil.py --- a/mercurial/pure/osutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/pure/osutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import os import stat as statmod -from ..pycompat import getattr from .. import ( encoding, pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/repoview.py --- a/mercurial/repoview.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/repoview.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,11 +15,6 @@ hex, nullrev, ) -from .pycompat import ( - delattr, - getattr, - setattr, -) from . import ( error, obsolete, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/revlog.py --- a/mercurial/revlog.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/revlog.py Fri Sep 01 00:09:55 2023 +0200 @@ -32,7 +32,6 @@ wdirrev, ) from .i18n import _ -from .pycompat import getattr from .revlogutils.constants import ( ALL_KINDS, CHANGELOGV2, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/revlogutils/deltas.py Fri Sep 01 00:09:55 2023 +0200 @@ -14,7 +14,6 @@ # import stuff from node for others to import from revlog from ..node import nullrev from ..i18n import _ -from ..pycompat import getattr from .constants import ( COMP_MODE_DEFAULT, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/revset.py --- a/mercurial/revset.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/revset.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,7 +12,6 @@ import re from .i18n import _ -from .pycompat import getattr from .node import ( bin, nullrev, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/revsetlang.py --- a/mercurial/revsetlang.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/revsetlang.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ import string from .i18n import _ -from .pycompat import getattr from .node import hex from . import ( error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/scmposix.py --- a/mercurial/scmposix.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/scmposix.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ Tuple, ) -from .pycompat import getattr from . import ( encoding, pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/scmutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -23,7 +23,6 @@ short, wdirrev, ) -from .pycompat import getattr from .thirdparty import attr from . import ( copies as copiesmod, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/smartset.py --- a/mercurial/smartset.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/smartset.py Fri Sep 01 00:09:55 2023 +0200 @@ -6,7 +6,6 @@ # GNU General Public License version 2 or any later version. -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/sshpeer.py --- a/mercurial/sshpeer.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/sshpeer.py Fri Sep 01 00:09:55 2023 +0200 @@ -10,7 +10,6 @@ import uuid from .i18n import _ -from .pycompat import getattr from . import ( error, pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/sslutil.py --- a/mercurial/sslutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/sslutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -15,7 +15,6 @@ import warnings from .i18n import _ -from .pycompat import getattr from .node import hex from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/statprof.py --- a/mercurial/statprof.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/statprof.py Fri Sep 01 00:09:55 2023 +0200 @@ -167,7 +167,7 @@ # a float if frequency: self.sample_interval = 1.0 / frequency - elif not pycompat.hasattr(self, 'sample_interval'): + elif not hasattr(self, 'sample_interval'): # default to 1000 Hz self.sample_interval = 1.0 / 1000.0 else: diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/store.py --- a/mercurial/store.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/store.py Fri Sep 01 00:09:55 2023 +0200 @@ -13,7 +13,6 @@ from typing import Generator, List from .i18n import _ -from .pycompat import getattr from .thirdparty import attr from .node import hex from .revlogutils.constants import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/strip.py --- a/mercurial/strip.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/strip.py Fri Sep 01 00:09:55 2023 +0200 @@ -1,5 +1,4 @@ from .i18n import _ -from .pycompat import getattr from . import ( bookmarks as bookmarksmod, cmdutil, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/subrepoutil.py --- a/mercurial/subrepoutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/subrepoutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import re from .i18n import _ -from .pycompat import getattr from . import ( config, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/templater.py --- a/mercurial/templater.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/templater.py Fri Sep 01 00:09:55 2023 +0200 @@ -72,7 +72,6 @@ from .i18n import _ from .pycompat import ( FileNotFoundError, - getattr, ) from . import ( config, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/templateutil.py --- a/mercurial/templateutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/templateutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -10,7 +10,6 @@ import types from .i18n import _ -from .pycompat import getattr from . import ( error, pycompat, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/testing/storage.py --- a/mercurial/testing/storage.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/testing/storage.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,7 +12,6 @@ hex, nullrev, ) -from ..pycompat import getattr from .. import ( error, mdiff, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/ui.py --- a/mercurial/ui.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/ui.py Fri Sep 01 00:09:55 2023 +0200 @@ -37,7 +37,6 @@ from .i18n import _ from .node import hex from .pycompat import ( - getattr, open, ) diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/unionrepo.py --- a/mercurial/unionrepo.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/unionrepo.py Fri Sep 01 00:09:55 2023 +0200 @@ -13,7 +13,6 @@ from .i18n import _ -from .pycompat import getattr from . import ( changelog, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/upgrade_utils/engine.py --- a/mercurial/upgrade_utils/engine.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/upgrade_utils/engine.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ import stat from ..i18n import _ -from ..pycompat import getattr from .. import ( error, metadata, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/urllibcompat.py --- a/mercurial/urllibcompat.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/urllibcompat.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ import urllib.request import urllib.response -from .pycompat import getattr from . import pycompat _sysstr = pycompat.sysstr diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/util.py --- a/mercurial/util.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/util.py Fri Sep 01 00:09:55 2023 +0200 @@ -37,10 +37,7 @@ from .node import hex from .thirdparty import attr from .pycompat import ( - delattr, - getattr, open, - setattr, ) from hgdemandimport import tracing from . import ( diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/utils/compression.py --- a/mercurial/utils/compression.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/utils/compression.py Fri Sep 01 00:09:55 2023 +0200 @@ -8,7 +8,6 @@ import collections import zlib -from ..pycompat import getattr from .. import ( error, i18n, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/utils/procutil.py --- a/mercurial/utils/procutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/utils/procutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -24,7 +24,6 @@ from ..i18n import _ from ..pycompat import ( - getattr, open, ) diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/utils/urlutil.py --- a/mercurial/utils/urlutil.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/utils/urlutil.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,10 +9,6 @@ import socket from ..i18n import _ -from ..pycompat import ( - getattr, - setattr, -) from .. import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/vfs.py --- a/mercurial/vfs.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/vfs.py Fri Sep 01 00:09:55 2023 +0200 @@ -16,11 +16,6 @@ ) from .i18n import _ -from .pycompat import ( - delattr, - getattr, - setattr, -) from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/windows.py --- a/mercurial/windows.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/windows.py Fri Sep 01 00:09:55 2023 +0200 @@ -33,7 +33,6 @@ ) from .i18n import _ -from .pycompat import getattr from . import ( encoding, error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/wireprotoframing.py --- a/mercurial/wireprotoframing.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/wireprotoframing.py Fri Sep 01 00:09:55 2023 +0200 @@ -14,7 +14,6 @@ import struct from .i18n import _ -from .pycompat import getattr from .thirdparty import attr from . import ( encoding, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/wireprototypes.py --- a/mercurial/wireprototypes.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/wireprototypes.py Fri Sep 01 00:09:55 2023 +0200 @@ -9,7 +9,6 @@ hex, ) from .i18n import _ -from .pycompat import getattr from .thirdparty import attr from . import ( error, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/wireprotov1peer.py --- a/mercurial/wireprotov1peer.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/wireprotov1peer.py Fri Sep 01 00:09:55 2023 +0200 @@ -12,10 +12,6 @@ from concurrent import futures from .i18n import _ from .node import bin -from .pycompat import ( - getattr, - setattr, -) from . import ( bundle2, changegroup as changegroupmod, diff -r d718eddf01d9 -r 18c8c18993f0 mercurial/wireprotov1server.py --- a/mercurial/wireprotov1server.py Thu Aug 31 23:56:15 2023 +0200 +++ b/mercurial/wireprotov1server.py Fri Sep 01 00:09:55 2023 +0200 @@ -11,7 +11,6 @@ from .i18n import _ from .node import hex -from .pycompat import getattr from . import ( bundle2,