Mercurial > public > mercurial-scm > hg
comparison contrib/byteify-strings.py @ 43379:bb509f39d387 stable
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.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 02 Nov 2019 11:48:38 -0700 |
parents | 2372284d9457 |
children | 09234eeae206 |
comparison
equal
deleted
inserted
replaced
43378:2d31ef3fb494 | 43379:bb509f39d387 |
---|---|
337 fout = sys.stdout.buffer | 337 fout = sys.stdout.buffer |
338 process(fin, fout, opts) | 338 process(fin, fout, opts) |
339 | 339 |
340 | 340 |
341 if __name__ == '__main__': | 341 if __name__ == '__main__': |
342 if sys.version_info.major < 3: | 342 if sys.version_info[0:2] < (3, 6): |
343 print('This script must be run under Python 3.') | 343 print('This script must be run under Python 3.6+') |
344 sys.exit(3) | 344 sys.exit(3) |
345 main() | 345 main() |