commit | 094bcdb9e5dcb2ebe0ef780faf0559ab72b50bac | [log] [tgz] |
---|---|---|
author | Kevin Lubick <kjlubick@google.com> | Thu May 05 15:47:26 2022 -0400 |
committer | Kevin Lubick <kjlubick@google.com> | Thu May 05 20:01:29 2022 +0000 |
tree | 613977123075f9e5bb198bcd594fff20d96b9844 | |
parent | a683fe6c00145580f2b8f3d4c4edcb816d3eef1e [diff] |
[infra] Use Python3 for our Presubmits https://source.chromium.org/chromium/chromium/tools/depot_tools/+/main:presubmit_support.py;l=319;drc=443d9135cc33f3156d5fe25ebec33f9adffbab65 This also makes any errors from `make train -C infra/bots` look well formatted because check_output returns a bytestring in Python3 and when that is printed, the newlines et al are not rendered correctly. Thus we want the output of check_output to be encoded to UTF-8. Without setting the USE_PYTHON3 = True in PRESUBMIT.py, it appears that `git cl upload` would try to run our infra_tests.py in Python2 mode, which does not have the encoding argument for check_output. Apparently cipd_bin_packages/vpython3 does not have the "six" package installed (but cipd_bin_packages/vpython does) so I replaced the six.StringIO with io.StringIO, which is where that is located in Python3. Change-Id: Ic8f61bf943531583ba3d110a85260d69bdbf5eb2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/537677 Reviewed-by: Ravi Mistry <rmistry@google.com> Reviewed-by: Eric Boren <borenet@google.com>