comparison tests/run-tests.py @ 25160:fefc72523491

run-tests: insist that if people use Python 3, they use 3.5.x We depend on both stdlib functionality (difflib.diff_bytes) and language behavior (bytes formatting) introduced in 3.5, so let's try and prevent some useless bug reports before they happen.
author Augie Fackler <augie@google.com>
date Sun, 17 May 2015 21:26:04 -0400
parents 138dc8381049
children 4d30467d944e
comparison
equal deleted inserted replaced
25159:138dc8381049 25160:fefc72523491
76 except ImportError: 76 except ImportError:
77 json = None 77 json = None
78 78
79 processlock = threading.Lock() 79 processlock = threading.Lock()
80 80
81 if sys.version_info > (3, 0, 0): 81 if sys.version_info > (3, 5, 0):
82 PYTHON3 = True 82 PYTHON3 = True
83 xrange = range # we use xrange in one place, and we'd rather not use range 83 xrange = range # we use xrange in one place, and we'd rather not use range
84 elif sys.version_info >= (3, 0, 0):
85 print('%s is only supported on Python 3.5+ and 2.6-2.7, not %s' %
86 (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3])))
87 sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
84 else: 88 else:
85 PYTHON3 = False 89 PYTHON3 = False
86 90
87 def checkportisavailable(port): 91 def checkportisavailable(port):
88 """return true if a port seems free to bind on localhost""" 92 """return true if a port seems free to bind on localhost"""