contrib: require Python 3.6 for byteify-strings.py stable
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 02 Nov 2019 11:48:38 -0700
branchstable
changeset 43379 bb509f39d387
parent 43378 2d31ef3fb494
child 43380 579672b347d2
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.
contrib/byteify-strings.py
tests/test-byteify-strings.t
--- a/contrib/byteify-strings.py	Sat Nov 02 11:42:46 2019 -0700
+++ b/contrib/byteify-strings.py	Sat Nov 02 11:48:38 2019 -0700
@@ -339,7 +339,7 @@
 
 
 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()
--- a/tests/test-byteify-strings.t	Sat Nov 02 11:42:46 2019 -0700
+++ b/tests/test-byteify-strings.t	Sat Nov 02 11:48:38 2019 -0700
@@ -1,4 +1,4 @@
-#require py3
+#require py36
 
   $ byteify_strings () {
   >   $PYTHON "$TESTDIR/../contrib/byteify-strings.py" "$@"