Patchwork [5,of,7] lsprofcalltree: use absolute_import

login
register
mail settings
Submitter Gregory Szorc
Date Dec. 23, 2015, 12:31 a.m.
Message ID <2049ead0e389455868f6.1450830708@7.1.168.192.in-addr.arpa>
Download mbox | patch
Permalink /patch/12257/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Gregory Szorc - Dec. 23, 2015, 12:31 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 1450763055 28800
#      Mon Dec 21 21:44:15 2015 -0800
# Node ID 2049ead0e389455868f696943385e327f5fa6bb1
# Parent  b2b3e0f020a6f11c742cbf8fc76f702a92124818
lsprofcalltree: use absolute_import

Patch

diff --git a/mercurial/lsprofcalltree.py b/mercurial/lsprofcalltree.py
--- a/mercurial/lsprofcalltree.py
+++ b/mercurial/lsprofcalltree.py
@@ -9,8 +9,10 @@  Authors:
 This software may be used and distributed according to the terms
 of the GNU General Public License, incorporated herein by reference.
 """
 
+from __future__ import absolute_import
+
 def label(code):
     if isinstance(code, str):
         return '~' + code    # built-in functions ('~' sorts at the end)
     else:
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
@@ -110,9 +110,8 @@ 
   mercurial/keepalive.py not using absolute_import
   mercurial/keepalive.py requires print_function
   mercurial/localrepo.py not using absolute_import
   mercurial/lsprof.py requires print_function
-  mercurial/lsprofcalltree.py not using absolute_import
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function
   setup.py not using absolute_import
   tests/filterpyflakes.py requires print_function