templater: use absolute_import
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 08 Aug 2015 18:23:53 -0700
changeset 25985 7eb357b5f774
parent 25984 c57509e88922
child 25986 89049011f304
templater: use absolute_import
mercurial/templater.py
tests/test-module-imports.t
--- a/mercurial/templater.py	Sat Aug 08 20:09:43 2015 -0700
+++ b/mercurial/templater.py	Sat Aug 08 18:23:53 2015 -0700
@@ -5,12 +5,23 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from i18n import _
-import os, re
-import util, config, templatefilters, templatekw, parser, error
-import revset as revsetmod
+from __future__ import absolute_import
+
+import os
+import re
 import types
-import minirst
+
+from .i18n import _
+from . import (
+    config,
+    error,
+    minirst,
+    parser,
+    revset as revsetmod,
+    templatefilters,
+    templatekw,
+    util,
+)
 
 # template parsing
 
--- a/tests/test-module-imports.t	Sat Aug 08 20:09:43 2015 -0700
+++ b/tests/test-module-imports.t	Sat Aug 08 18:23:53 2015 -0700
@@ -112,9 +112,6 @@
 these may expose other cycles.
 
   $ hg locate 'mercurial/**.py' 'hgext/**.py' | sed 's-\\-/-g' | python "$import_checker" -
-  mercurial/templater.py mixed imports
-     stdlib:    parser
-     relative:  config, error, templatefilters, templatekw, util
   mercurial/ui.py mixed imports
      stdlib:    formatter
      relative:  config, error, progress, scmutil, util