Patchwork [9,of,9] parsers: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 12, 2015, 6:47 p.m.
Message ID <d533df9b5b85a1da4d78.1449946072@gps-mbp.local>
Download mbox | patch
Permalink /patch/11991/
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 1449945569 18000
#      Sat Dec 12 13:39:29 2015 -0500
# Node ID d533df9b5b85a1da4d7810368eae4afa62906611
# Parent  15481649cb4fd73326e7223da49b9a8b30b56af6
parsers: use absolute_import

Patch

diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -4,10 +4,15 @@ 
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from mercurial.node import nullid
-import struct, zlib, cStringIO
+from __future__ import absolute_import
+
+import cStringIO
+import struct
+import zlib
+
+from .node import nullid
 
 _pack = struct.pack
 _unpack = struct.unpack
 _compress = zlib.compress
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/mail.py requires print_function
   mercurial/manifest.py not using absolute_import
   mercurial/mdiff.py not using absolute_import
   mercurial/patch.py not using absolute_import
-  mercurial/pure/parsers.py not using absolute_import
   mercurial/pvec.py not using absolute_import
   mercurial/py3kcompat.py not using absolute_import
   mercurial/revlog.py not using absolute_import
   mercurial/scmposix.py not using absolute_import