# HG changeset patch # User Robert Stanca # Date 2016-04-02 14:35:02 # Node ID cf339d6ac7c7236d479561c28be86ee851fa92a3 # Parent 18e738038d780e0fdd78aeff0b5c9f434d0d8d27 py3: use print_function in filterpyflakes.py diff --git a/tests/filterpyflakes.py b/tests/filterpyflakes.py --- a/tests/filterpyflakes.py +++ b/tests/filterpyflakes.py @@ -2,7 +2,7 @@ # Filter output by pyflakes to control which warnings we check -from __future__ import absolute_import +from __future__ import absolute_import, print_function import re import sys @@ -54,8 +54,8 @@ for line in sys.stdin: for msgtype, line in sorted(lines, key=makekey): sys.stdout.write(line) -print +print() # self test of "undefined name" detection for other than 'memoryview' if False: - print undefinedname + print(undefinedname) 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 @@ -40,7 +40,6 @@ i18n/check-translation.py not using absolute_import i18n/polib.py not using absolute_import setup.py not using absolute_import - tests/filterpyflakes.py requires print_function tests/generate-working-copy-states.py requires print_function tests/get-with-headers.py requires print_function tests/heredoctest.py requires print_function @@ -259,7 +258,6 @@ mercurial/win*.py: error importing module: No module named 'msvcrt' (line *) (glob) mercurial/windows.py: error importing module: No module named '_winreg' (line *) (glob) mercurial/wireproto.py: error importing module: invalid syntax (bundle*.py, line *) (line *) (glob) - tests/filterpyflakes.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/generate-working-copy-states.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/get-with-headers.py: invalid syntax: Missing parentheses in call to 'print' (, line *) (glob) tests/readlink.py: invalid syntax: invalid syntax (, line *) (glob)