Patchwork [5,of,9] bdiff: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 12, 2015, 6:47 p.m.
Message ID <2fa9b220087a948d54ec.1449946068@gps-mbp.local>
Download mbox | patch
Permalink /patch/11987/
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 1449945295 18000
#      Sat Dec 12 13:34:55 2015 -0500
# Node ID 2fa9b220087a948d54ecbdb47a186c3833633c27
# Parent  2ec63882a7415018adb94fb1568d71d7288f473c
bdiff: use absolute_import

Patch

diff --git a/mercurial/pure/bdiff.py b/mercurial/pure/bdiff.py
--- a/mercurial/pure/bdiff.py
+++ b/mercurial/pure/bdiff.py
@@ -4,9 +4,13 @@ 
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import struct, difflib, re
+from __future__ import absolute_import
+
+import difflib
+import re
+import struct
 
 def splitnewlines(text):
     '''like str.splitlines, but only split on newlines.'''
     lines = [l + '\n' for l in text.split('\n')]
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/bdiff.py not using absolute_import
   mercurial/pure/diffhelpers.py not using absolute_import
   mercurial/pure/mpatch.py not using absolute_import
   mercurial/pure/osutil.py not using absolute_import
   mercurial/pure/parsers.py not using absolute_import