##// END OF EJS Templates
py3: manually import getattr where it is needed...
Gregory Szorc -
r43359:c59eb156 default
parent child Browse files
Show More
@@ -12,7 +12,10 b' import re'
12 import socket
12 import socket
13
13
14 from mercurial.i18n import _
14 from mercurial.i18n import _
15 from mercurial.pycompat import open
15 from mercurial.pycompat import (
16 getattr,
17 open,
18 )
16 from mercurial import (
19 from mercurial import (
17 encoding,
20 encoding,
18 error,
21 error,
@@ -25,6 +25,7 b' import svn.ra'
25 Pool = svn.core.Pool
25 Pool = svn.core.Pool
26 SubversionException = svn.core.SubversionException
26 SubversionException = svn.core.SubversionException
27
27
28 from mercurial.pycompat import getattr
28 from mercurial import util
29 from mercurial import util
29
30
30 # Some older versions of the Python bindings need to be
31 # Some older versions of the Python bindings need to be
@@ -14,6 +14,7 b' import os'
14
14
15 from mercurial.i18n import _
15 from mercurial.i18n import _
16 from mercurial.pycompat import (
16 from mercurial.pycompat import (
17 getattr,
17 open,
18 open,
18 setattr,
19 setattr,
19 )
20 )
@@ -7,6 +7,7 b''
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from mercurial.pycompat import getattr
10 from mercurial import (
11 from mercurial import (
11 context as hgcontext,
12 context as hgcontext,
12 dagop,
13 dagop,
@@ -206,7 +206,10 b' import os'
206 import struct
206 import struct
207
207
208 from mercurial.i18n import _
208 from mercurial.i18n import _
209 from mercurial.pycompat import open
209 from mercurial.pycompat import (
210 getattr,
211 open,
212 )
210 from mercurial import (
213 from mercurial import (
211 bundle2,
214 bundle2,
212 cmdutil,
215 cmdutil,
@@ -103,7 +103,10 b' from mercurial.node import ('
103
103
104 from mercurial.i18n import _
104 from mercurial.i18n import _
105
105
106 from mercurial.pycompat import open
106 from mercurial.pycompat import (
107 getattr,
108 open,
109 )
107
110
108 from mercurial.utils import (
111 from mercurial.utils import (
109 procutil,
112 procutil,
@@ -90,6 +90,7 b' import re'
90 import weakref
90 import weakref
91
91
92 from mercurial.i18n import _
92 from mercurial.i18n import _
93 from mercurial.pycompat import getattr
93 from mercurial.hgweb import webcommands
94 from mercurial.hgweb import webcommands
94
95
95 from mercurial import (
96 from mercurial import (
@@ -6,7 +6,7 b' from __future__ import absolute_import'
6 import re
6 import re
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9
9 from mercurial.pycompat import getattr
10 from mercurial import (
10 from mercurial import (
11 error,
11 error,
12 hg,
12 hg,
@@ -16,6 +16,7 b' import re'
16 import socket
16 import socket
17
17
18 from mercurial.i18n import _
18 from mercurial.i18n import _
19 from mercurial.pycompat import getattr
19
20
20 from mercurial import (
21 from mercurial import (
21 encoding,
22 encoding,
@@ -11,7 +11,10 b' import hashlib'
11
11
12 from mercurial.i18n import _
12 from mercurial.i18n import _
13 from mercurial.node import bin, hex, nullid, short
13 from mercurial.node import bin, hex, nullid, short
14 from mercurial.pycompat import setattr
14 from mercurial.pycompat import (
15 getattr,
16 setattr,
17 )
15
18
16 from mercurial import (
19 from mercurial import (
17 bundle2,
20 bundle2,
@@ -76,7 +76,10 b' from mercurial.node import ('
76 nullrev,
76 nullrev,
77 short,
77 short,
78 )
78 )
79 from mercurial.pycompat import open
79 from mercurial.pycompat import (
80 getattr,
81 open,
82 )
80 from mercurial import (
83 from mercurial import (
81 cmdutil,
84 cmdutil,
82 commands,
85 commands,
@@ -49,6 +49,7 b' import re'
49
49
50 from mercurial.node import bin, nullid
50 from mercurial.node import bin, nullid
51 from mercurial.i18n import _
51 from mercurial.i18n import _
52 from mercurial.pycompat import getattr
52 from mercurial import (
53 from mercurial import (
53 cmdutil,
54 cmdutil,
54 context,
55 context,
@@ -9,7 +9,10 b' import struct'
9 import time
9 import time
10
10
11 from mercurial.i18n import _
11 from mercurial.i18n import _
12 from mercurial.pycompat import open
12 from mercurial.pycompat import (
13 getattr,
14 open,
15 )
13 from mercurial import (
16 from mercurial import (
14 node as nodemod,
17 node as nodemod,
15 policy,
18 policy,
@@ -3,6 +3,7 b' from __future__ import absolute_import'
3 import threading
3 import threading
4
4
5 from mercurial.node import hex, nullid
5 from mercurial.node import hex, nullid
6 from mercurial.pycompat import getattr
6 from mercurial import (
7 from mercurial import (
7 mdiff,
8 mdiff,
8 pycompat,
9 pycompat,
@@ -6,6 +6,7 b' repository. See the command help for det'
6 from __future__ import absolute_import
6 from __future__ import absolute_import
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 from mercurial.pycompat import getattr
9 from mercurial import (
10 from mercurial import (
10 bookmarks as bookmarksmod,
11 bookmarks as bookmarksmod,
11 cmdutil,
12 cmdutil,
@@ -50,7 +50,7 b' import os'
50 import sys
50 import sys
51
51
52 from mercurial.i18n import _
52 from mercurial.i18n import _
53 from mercurial.pycompat import setattr
53 from mercurial.pycompat import getattr, setattr
54 from mercurial import (
54 from mercurial import (
55 encoding,
55 encoding,
56 error,
56 error,
@@ -171,7 +171,7 b' if sys.version_info[0] >= 3:'
171 r, c = t.start
171 r, c = t.start
172 l = (
172 l = (
173 b'; from mercurial.pycompat import '
173 b'; from mercurial.pycompat import '
174 b'delattr, getattr\n'
174 b'delattr\n'
175 )
175 )
176 for u in tokenize.tokenize(io.BytesIO(l).readline):
176 for u in tokenize.tokenize(io.BytesIO(l).readline):
177 if u.type in (tokenize.ENCODING, token.ENDMARKER):
177 if u.type in (tokenize.ENCODING, token.ENDMARKER):
@@ -220,7 +220,7 b' if sys.version_info[0] >= 3:'
220 # ``replacetoken`` or any mechanism that changes semantics of module
220 # ``replacetoken`` or any mechanism that changes semantics of module
221 # loading is changed. Otherwise cached bytecode may get loaded without
221 # loading is changed. Otherwise cached bytecode may get loaded without
222 # the new transformation mechanisms applied.
222 # the new transformation mechanisms applied.
223 BYTECODEHEADER = b'HG\x00\x10'
223 BYTECODEHEADER = b'HG\x00\x11'
224
224
225 class hgloader(importlib.machinery.SourceFileLoader):
225 class hgloader(importlib.machinery.SourceFileLoader):
226 """Custom module loader that transforms source code.
226 """Custom module loader that transforms source code.
@@ -17,6 +17,7 b' from .node import ('
17 short,
17 short,
18 wdirid,
18 wdirid,
19 )
19 )
20 from .pycompat import getattr
20 from . import (
21 from . import (
21 encoding,
22 encoding,
22 error,
23 error,
@@ -51,7 +51,10 b' import struct'
51 import time
51 import time
52
52
53 from .i18n import _
53 from .i18n import _
54 from .pycompat import setattr
54 from .pycompat import (
55 getattr,
56 setattr,
57 )
55
58
56 from . import (
59 from . import (
57 commandserver,
60 commandserver,
@@ -20,6 +20,7 b' from .node import ('
20 short,
20 short,
21 )
21 )
22 from .pycompat import (
22 from .pycompat import (
23 getattr,
23 open,
24 open,
24 setattr,
25 setattr,
25 )
26 )
@@ -10,6 +10,7 b' from __future__ import absolute_import'
10 import re
10 import re
11
11
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import getattr
13
14
14 from . import (
15 from . import (
15 encoding,
16 encoding,
@@ -24,6 +24,7 b' except ImportError:'
24 from .thirdparty import selectors2 as selectors
24 from .thirdparty import selectors2 as selectors
25
25
26 from .i18n import _
26 from .i18n import _
27 from .pycompat import getattr
27 from . import (
28 from . import (
28 encoding,
29 encoding,
29 error,
30 error,
@@ -11,6 +11,7 b' import errno'
11 import os
11 import os
12
12
13 from .i18n import _
13 from .i18n import _
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 error,
16 error,
16 pycompat,
17 pycompat,
@@ -23,7 +23,10 b' from .node import ('
23 wdirfilenodeids,
23 wdirfilenodeids,
24 wdirhex,
24 wdirhex,
25 )
25 )
26 from .pycompat import open
26 from .pycompat import (
27 getattr,
28 open,
29 )
27 from . import (
30 from . import (
28 copies,
31 copies,
29 dagop,
32 dagop,
@@ -16,7 +16,10 b' import re'
16 import signal
16 import signal
17
17
18 from .i18n import _
18 from .i18n import _
19 from .pycompat import open
19 from .pycompat import (
20 getattr,
21 open,
22 )
20 from . import (
23 from . import (
21 encoding,
24 encoding,
22 error,
25 error,
@@ -32,7 +32,10 b' from .node import ('
32 nullrev,
32 nullrev,
33 short,
33 short,
34 )
34 )
35 from .pycompat import open
35 from .pycompat import (
36 getattr,
37 open,
38 )
36 from . import (
39 from . import (
37 bundle2,
40 bundle2,
38 changegroup,
41 changegroup,
@@ -20,6 +20,7 b' import traceback'
20
20
21
21
22 from .i18n import _
22 from .i18n import _
23 from .pycompat import getattr
23
24
24 from hgdemandimport import tracing
25 from hgdemandimport import tracing
25
26
@@ -11,6 +11,7 b' import locale'
11 import os
11 import os
12 import unicodedata
12 import unicodedata
13
13
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 error,
16 error,
16 policy,
17 policy,
@@ -19,6 +19,7 b' from .i18n import ('
19 gettext,
19 gettext,
20 )
20 )
21 from .pycompat import (
21 from .pycompat import (
22 getattr,
22 open,
23 open,
23 setattr,
24 setattr,
24 )
25 )
@@ -18,7 +18,10 b' from .node import ('
18 nullid,
18 nullid,
19 short,
19 short,
20 )
20 )
21 from .pycompat import open
21 from .pycompat import (
22 getattr,
23 open,
24 )
22
25
23 from . import (
26 from . import (
24 encoding,
27 encoding,
@@ -11,6 +11,7 b' import errno'
11 import re
11 import re
12
12
13 from .i18n import _
13 from .i18n import _
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 error,
16 error,
16 filesetlang,
17 filesetlang,
@@ -8,6 +8,7 b''
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from .i18n import _
10 from .i18n import _
11 from .pycompat import getattr
11 from . import (
12 from . import (
12 error,
13 error,
13 parser,
14 parser,
@@ -16,6 +16,7 b' from .i18n import ('
16 _,
16 _,
17 gettext,
17 gettext,
18 )
18 )
19 from .pycompat import getattr
19 from . import (
20 from . import (
20 cmdutil,
21 cmdutil,
21 encoding,
22 encoding,
@@ -16,6 +16,7 b' import stat'
16
16
17 from .i18n import _
17 from .i18n import _
18 from .node import nullid
18 from .node import nullid
19 from .pycompat import getattr
19
20
20 from . import (
21 from . import (
21 bookmarks,
22 bookmarks,
@@ -14,7 +14,10 b' import mimetypes'
14 import os
14 import os
15 import stat
15 import stat
16
16
17 from ..pycompat import open
17 from ..pycompat import (
18 getattr,
19 open,
20 )
18 from .. import (
21 from .. import (
19 encoding,
22 encoding,
20 pycompat,
23 pycompat,
@@ -18,6 +18,7 b' from .common import ('
18 permhooks,
18 permhooks,
19 statusmessage,
19 statusmessage,
20 )
20 )
21 from ..pycompat import getattr
21
22
22 from .. import (
23 from .. import (
23 encoding,
24 encoding,
@@ -17,7 +17,10 b' import traceback'
17 import wsgiref.validate
17 import wsgiref.validate
18
18
19 from ..i18n import _
19 from ..i18n import _
20 from ..pycompat import open
20 from ..pycompat import (
21 getattr,
22 open,
23 )
21
24
22 from .. import (
25 from .. import (
23 encoding,
26 encoding,
@@ -14,6 +14,7 b' import re'
14
14
15 from ..i18n import _
15 from ..i18n import _
16 from ..node import hex, short
16 from ..node import hex, short
17 from ..pycompat import getattr
17
18
18 from .common import (
19 from .common import (
19 ErrorResponse,
20 ErrorResponse,
@@ -12,6 +12,7 b' from __future__ import absolute_import'
12
12
13 import os
13 import os
14
14
15 from ..pycompat import getattr
15 from .. import pycompat
16 from .. import pycompat
16
17
17 from ..utils import procutil
18 from ..utils import procutil
@@ -11,6 +11,7 b' import os'
11 import sys
11 import sys
12
12
13 from .i18n import _
13 from .i18n import _
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 demandimport,
16 demandimport,
16 encoding,
17 encoding,
@@ -16,6 +16,7 b' import struct'
16 import weakref
16 import weakref
17
17
18 from .i18n import _
18 from .i18n import _
19 from .pycompat import getattr
19 from . import (
20 from . import (
20 bundle2,
21 bundle2,
21 error,
22 error,
@@ -12,6 +12,7 b' import locale'
12 import os
12 import os
13 import sys
13 import sys
14
14
15 from .pycompat import getattr
15 from . import (
16 from . import (
16 encoding,
17 encoding,
17 pycompat,
18 pycompat,
@@ -92,6 +92,7 b' import sys'
92 import threading
92 import threading
93
93
94 from .i18n import _
94 from .i18n import _
95 from .pycompat import getattr
95 from . import (
96 from . import (
96 node,
97 node,
97 pycompat,
98 pycompat,
@@ -23,6 +23,7 b' from .node import ('
23 nullrev,
23 nullrev,
24 short,
24 short,
25 )
25 )
26 from .pycompat import getattr
26 from . import (
27 from . import (
27 bookmarks,
28 bookmarks,
28 branchmap,
29 branchmap,
@@ -16,6 +16,7 b' import time'
16 import warnings
16 import warnings
17
17
18 from .i18n import _
18 from .i18n import _
19 from .pycompat import getattr
19
20
20 from . import (
21 from . import (
21 encoding,
22 encoding,
@@ -3,6 +3,8 b' from __future__ import absolute_import, '
3 import _lsprof
3 import _lsprof
4 import sys
4 import sys
5
5
6 from .pycompat import getattr
7
6 Profiler = _lsprof.Profiler
8 Profiler = _lsprof.Profiler
7
9
8 # PyPy doesn't expose profiler_entry from the module.
10 # PyPy doesn't expose profiler_entry from the module.
@@ -19,7 +19,10 b' import socket'
19 import time
19 import time
20
20
21 from .i18n import _
21 from .i18n import _
22 from .pycompat import open
22 from .pycompat import (
23 getattr,
24 open,
25 )
23 from . import (
26 from . import (
24 encoding,
27 encoding,
25 error,
28 error,
@@ -19,6 +19,7 b' from .node import ('
19 nullid,
19 nullid,
20 nullrev,
20 nullrev,
21 )
21 )
22 from .pycompat import getattr
22 from . import (
23 from . import (
23 error,
24 error,
24 mdiff,
25 mdiff,
@@ -12,7 +12,10 b' import struct'
12 import zlib
12 import zlib
13
13
14 from .i18n import _
14 from .i18n import _
15 from .pycompat import setattr
15 from .pycompat import (
16 getattr,
17 setattr,
18 )
16 from . import (
19 from . import (
17 encoding,
20 encoding,
18 error,
21 error,
@@ -8,6 +8,7 b''
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from .i18n import _
10 from .i18n import _
11 from .pycompat import getattr
11 from .interfaces import repository
12 from .interfaces import repository
12 from . import (
13 from . import (
13 error,
14 error,
@@ -74,6 +74,7 b' import hashlib'
74 import struct
74 import struct
75
75
76 from .i18n import _
76 from .i18n import _
77 from .pycompat import getattr
77 from . import (
78 from . import (
78 encoding,
79 encoding,
79 error,
80 error,
@@ -113,7 +113,10 b' from .node import ('
113 nullrev,
113 nullrev,
114 short,
114 short,
115 )
115 )
116 from .pycompat import setattr
116 from .pycompat import (
117 getattr,
118 setattr,
119 )
117 from . import (
120 from . import (
118 error,
121 error,
119 pycompat,
122 pycompat,
@@ -10,6 +10,8 b' from __future__ import absolute_import'
10 import os
10 import os
11 import sys
11 import sys
12
12
13 from .pycompat import getattr
14
13 # Rules for how modules can be loaded. Values are:
15 # Rules for how modules can be loaded. Values are:
14 #
16 #
15 # c - require C extensions
17 # c - require C extensions
@@ -21,7 +21,10 b' import tempfile'
21 import unicodedata
21 import unicodedata
22
22
23 from .i18n import _
23 from .i18n import _
24 from .pycompat import open
24 from .pycompat import (
25 getattr,
26 open,
27 )
25 from . import (
28 from . import (
26 encoding,
29 encoding,
27 error,
30 error,
@@ -10,7 +10,10 b' from __future__ import absolute_import, '
10 import contextlib
10 import contextlib
11
11
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import open
13 from .pycompat import (
14 getattr,
15 open,
16 )
14 from . import (
17 from . import (
15 encoding,
18 encoding,
16 error,
19 error,
@@ -13,6 +13,7 b' import os'
13 import socket
13 import socket
14 import stat as statmod
14 import stat as statmod
15
15
16 from ..pycompat import getattr
16 from .. import (
17 from .. import (
17 encoding,
18 encoding,
18 pycompat,
19 pycompat,
@@ -355,6 +355,7 b' else:'
355 strurl = identity
355 strurl = identity
356 bytesurl = identity
356 bytesurl = identity
357 open = open
357 open = open
358 getattr = getattr
358 hasattr = hasattr
359 hasattr = hasattr
359 setattr = setattr
360 setattr = setattr
360
361
@@ -12,7 +12,10 b' import copy'
12 import weakref
12 import weakref
13
13
14 from .node import nullrev
14 from .node import nullrev
15 from .pycompat import setattr
15 from .pycompat import (
16 getattr,
17 setattr,
18 )
16 from . import (
19 from . import (
17 obsolete,
20 obsolete,
18 phases,
21 phases,
@@ -35,6 +35,7 b' from .node import ('
35 wdirrev,
35 wdirrev,
36 )
36 )
37 from .i18n import _
37 from .i18n import _
38 from .pycompat import getattr
38 from .revlogutils.constants import (
39 from .revlogutils.constants import (
39 FLAG_GENERALDELTA,
40 FLAG_GENERALDELTA,
40 FLAG_INLINE_DATA,
41 FLAG_INLINE_DATA,
@@ -15,6 +15,7 b' import struct'
15 # import stuff from node for others to import from revlog
15 # import stuff from node for others to import from revlog
16 from ..node import nullrev
16 from ..node import nullrev
17 from ..i18n import _
17 from ..i18n import _
18 from ..pycompat import getattr
18
19
19 from .constants import (
20 from .constants import (
20 REVIDX_ISCENSORED,
21 REVIDX_ISCENSORED,
@@ -10,6 +10,7 b' from __future__ import absolute_import'
10 import re
10 import re
11
11
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import getattr
13 from . import (
14 from . import (
14 dagop,
15 dagop,
15 destutil,
16 destutil,
@@ -10,6 +10,7 b' from __future__ import absolute_import'
10 import string
10 import string
11
11
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import getattr
13 from . import (
14 from . import (
14 error,
15 error,
15 node,
16 node,
@@ -6,6 +6,7 b' import fcntl'
6 import os
6 import os
7 import sys
7 import sys
8
8
9 from .pycompat import getattr
9 from . import (
10 from . import (
10 encoding,
11 encoding,
11 pycompat,
12 pycompat,
@@ -26,6 +26,7 b' from .node import ('
26 wdirid,
26 wdirid,
27 wdirrev,
27 wdirrev,
28 )
28 )
29 from .pycompat import getattr
29
30
30 from . import (
31 from . import (
31 copies as copiesmod,
32 copies as copiesmod,
@@ -7,6 +7,7 b''
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 from .pycompat import getattr
10 from . import (
11 from . import (
11 encoding,
12 encoding,
12 error,
13 error,
@@ -11,6 +11,7 b' import re'
11 import uuid
11 import uuid
12
12
13 from .i18n import _
13 from .i18n import _
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 error,
16 error,
16 pycompat,
17 pycompat,
@@ -15,6 +15,7 b' import re'
15 import ssl
15 import ssl
16
16
17 from .i18n import _
17 from .i18n import _
18 from .pycompat import getattr
18 from . import (
19 from . import (
19 encoding,
20 encoding,
20 error,
21 error,
@@ -14,6 +14,7 b' import os'
14 import stat
14 import stat
15
15
16 from .i18n import _
16 from .i18n import _
17 from .pycompat import getattr
17 from . import (
18 from . import (
18 changelog,
19 changelog,
19 error,
20 error,
@@ -13,6 +13,7 b' import posixpath'
13 import re
13 import re
14
14
15 from .i18n import _
15 from .i18n import _
16 from .pycompat import getattr
16 from . import (
17 from . import (
17 config,
18 config,
18 error,
19 error,
@@ -68,6 +68,7 b' import abc'
68 import os
68 import os
69
69
70 from .i18n import _
70 from .i18n import _
71 from .pycompat import getattr
71 from . import (
72 from . import (
72 config,
73 config,
73 encoding,
74 encoding,
@@ -11,6 +11,7 b' import abc'
11 import types
11 import types
12
12
13 from .i18n import _
13 from .i18n import _
14 from .pycompat import getattr
14 from . import (
15 from . import (
15 error,
16 error,
16 pycompat,
17 pycompat,
@@ -14,6 +14,7 b' from ..node import ('
14 nullid,
14 nullid,
15 nullrev,
15 nullrev,
16 )
16 )
17 from ..pycompat import getattr
17 from .. import (
18 from .. import (
18 error,
19 error,
19 mdiff,
20 mdiff,
@@ -23,6 +23,7 b' import traceback'
23 from .i18n import _
23 from .i18n import _
24 from .node import hex
24 from .node import hex
25 from .pycompat import (
25 from .pycompat import (
26 getattr,
26 open,
27 open,
27 setattr,
28 setattr,
28 )
29 )
@@ -14,6 +14,7 b' allowing operations like diff and log wi'
14 from __future__ import absolute_import
14 from __future__ import absolute_import
15
15
16 from .i18n import _
16 from .i18n import _
17 from .pycompat import getattr
17
18
18 from . import (
19 from . import (
19 changelog,
20 changelog,
@@ -10,6 +10,7 b' from __future__ import absolute_import'
10 import stat
10 import stat
11
11
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import getattr
13 from . import (
14 from . import (
14 changelog,
15 changelog,
15 error,
16 error,
@@ -15,6 +15,7 b' import socket'
15 import sys
15 import sys
16
16
17 from .i18n import _
17 from .i18n import _
18 from .pycompat import getattr
18 from . import (
19 from . import (
19 encoding,
20 encoding,
20 error,
21 error,
@@ -6,6 +6,7 b''
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7 from __future__ import absolute_import
7 from __future__ import absolute_import
8
8
9 from .pycompat import getattr
9 from . import pycompat
10 from . import pycompat
10
11
11 _sysstr = pycompat.sysstr
12 _sysstr = pycompat.sysstr
@@ -36,6 +36,7 b' import warnings'
36
36
37 from .thirdparty import attr
37 from .thirdparty import attr
38 from .pycompat import (
38 from .pycompat import (
39 getattr,
39 open,
40 open,
40 setattr,
41 setattr,
41 )
42 )
@@ -10,6 +10,7 b' import bz2'
10 import collections
10 import collections
11 import zlib
11 import zlib
12
12
13 from ..pycompat import getattr
13 from .. import (
14 from .. import (
14 error,
15 error,
15 i18n,
16 i18n,
@@ -20,7 +20,10 b' import sys'
20 import time
20 import time
21
21
22 from ..i18n import _
22 from ..i18n import _
23 from ..pycompat import open
23 from ..pycompat import (
24 getattr,
25 open,
26 )
24
27
25 from .. import (
28 from .. import (
26 encoding,
29 encoding,
@@ -14,7 +14,10 b' import stat'
14 import threading
14 import threading
15
15
16 from .i18n import _
16 from .i18n import _
17 from .pycompat import setattr
17 from .pycompat import (
18 getattr,
19 setattr,
20 )
18 from . import (
21 from . import (
19 encoding,
22 encoding,
20 error,
23 error,
@@ -16,6 +16,7 b' import string'
16 import sys
16 import sys
17
17
18 from .i18n import _
18 from .i18n import _
19 from .pycompat import getattr
19 from . import (
20 from . import (
20 encoding,
21 encoding,
21 error,
22 error,
@@ -15,6 +15,7 b' import collections'
15 import struct
15 import struct
16
16
17 from .i18n import _
17 from .i18n import _
18 from .pycompat import getattr
18 from .thirdparty import attr
19 from .thirdparty import attr
19 from . import (
20 from . import (
20 encoding,
21 encoding,
@@ -10,6 +10,7 b' from .node import ('
10 hex,
10 hex,
11 )
11 )
12 from .i18n import _
12 from .i18n import _
13 from .pycompat import getattr
13 from .thirdparty import attr
14 from .thirdparty import attr
14 from . import (
15 from . import (
15 error,
16 error,
@@ -13,7 +13,10 b' import weakref'
13
13
14 from .i18n import _
14 from .i18n import _
15 from .node import bin
15 from .node import bin
16 from .pycompat import setattr
16 from .pycompat import (
17 getattr,
18 setattr,
19 )
17 from . import (
20 from . import (
18 bundle2,
21 bundle2,
19 changegroup as changegroupmod,
22 changegroup as changegroupmod,
@@ -15,6 +15,7 b' from .node import ('
15 hex,
15 hex,
16 nullid,
16 nullid,
17 )
17 )
18 from .pycompat import getattr
18
19
19 from . import (
20 from . import (
20 bundle2,
21 bundle2,
General Comments 0
You need to be logged in to leave comments. Login now