# HG changeset patch # User Gregory Szorc # Date 2019-11-02 18:48:38 # Node ID bb509f39d387ae18214115e341a13417c197dd75 # Parent 2d31ef3fb4940b3beb41d32e03bdec8427c504f2 contrib: require Python 3.6 for byteify-strings.py This script makes use of `token.COMMENT`, which apparently isn't present until Python 3.6. So make the script and its test conditional on Python 3.6. diff --git a/contrib/byteify-strings.py b/contrib/byteify-strings.py --- a/contrib/byteify-strings.py +++ b/contrib/byteify-strings.py @@ -339,7 +339,7 @@ def main(): if __name__ == '__main__': - if sys.version_info.major < 3: - print('This script must be run under Python 3.') + if sys.version_info[0:2] < (3, 6): + print('This script must be run under Python 3.6+') sys.exit(3) main() diff --git a/tests/test-byteify-strings.t b/tests/test-byteify-strings.t --- a/tests/test-byteify-strings.t +++ b/tests/test-byteify-strings.t @@ -1,4 +1,4 @@ -#require py3 +#require py36 $ byteify_strings () { > $PYTHON "$TESTDIR/../contrib/byteify-strings.py" "$@"