lsprof: use print function
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 02 Jan 2016 11:40:53 -0800
changeset 27617 b1a59b80e1a3
parent 27616 0765d8423fbc
child 27618 5a988b3c9645
lsprof: use print function
mercurial/lsprof.py
tests/test-check-py3-compat.t
--- a/mercurial/lsprof.py	Sun Jun 21 23:14:54 2015 -0700
+++ b/mercurial/lsprof.py	Sat Jan 02 11:40:53 2016 -0800
@@ -1,4 +1,4 @@
-from __future__ import absolute_import
+from __future__ import absolute_import, print_function
 
 import _lsprof
 import sys
@@ -113,7 +113,7 @@
     import os
     sys.argv = sys.argv[1:]
     if not sys.argv:
-        print >> sys.stderr, "usage: lsprof.py <script> <arguments...>"
+        print("usage: lsprof.py <script> <arguments...>", file=sys.stderr)
         sys.exit(2)
     sys.path.insert(0, os.path.abspath(os.path.dirname(sys.argv[0])))
     stats = profile(execfile, sys.argv[0], globals(), locals())
--- a/tests/test-check-py3-compat.t	Sun Jun 21 23:14:54 2015 -0700
+++ b/tests/test-check-py3-compat.t	Sat Jan 02 11:40:53 2016 -0800
@@ -100,7 +100,6 @@
   i18n/polib.py not using absolute_import
   mercurial/cmdutil.py not using absolute_import
   mercurial/commands.py not using absolute_import
-  mercurial/lsprof.py requires print_function
   mercurial/lsprofcalltree.py requires print_function
   mercurial/mail.py requires print_function
   setup.py not using absolute_import