Patchwork [2,of,9] obsolete: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 12, 2015, 6:47 p.m.
Message ID <20fb54da45a5ed00f630.1449946065@gps-mbp.local>
Download mbox | patch
Permalink /patch/11984/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Gregory Szorc - Dec. 12, 2015, 6:47 p.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1449945047 18000
#      Sat Dec 12 13:30:47 2015 -0500
# Node ID 20fb54da45a5ed00f6304df9b3f15f1f70ef9232
# Parent  46821367d22ab471662c97e1f3216d8fe553d9d5
obsolete: use absolute_import

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -66,12 +66,22 @@  The file starts with a version header:
 The header is followed by the markers. Marker format depend of the version. See
 comment associated with each format for details.
 
 """
-import errno, struct
-import util, base85, node, parsers, error
-import phases
-from i18n import _
+from __future__ import absolute_import
+
+import errno
+import struct
+
+from .i18n import _
+from . import (
+    base85,
+    error,
+    node,
+    parsers,
+    phases,
+    util,
+)
 
 _pack = struct.pack
 _unpack = struct.unpack
 _calcsize = struct.calcsize
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
@@ -121,9 +121,8 @@ 
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function
   mercurial/manifest.py not using absolute_import
   mercurial/mdiff.py not using absolute_import
-  mercurial/obsolete.py not using absolute_import
   mercurial/patch.py not using absolute_import
   mercurial/pure/base85.py not using absolute_import
   mercurial/pure/bdiff.py not using absolute_import
   mercurial/pure/diffhelpers.py not using absolute_import