run-benchmark is almost Python 3 compatible, there are a few Popen calls that need to be decoded.
<rdar://problem/84098736>
Created attachment 440792 [details] Patch
Comment on attachment 440792 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=440792&action=review r=me > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:107 > + ) If we decide to go with invoking decode('utf-8') on output, we may not need it here because I don't think use output from `_browser_process` anyway. > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:73 > + **(dict(encoding='utf-8') if sys.version_info >= (3, 0) else dict()) I think encoding only available since python3.6. A most compatible way would be `process.communicate()[0].decode('utf-8')`.
(In reply to dewei_zhu from comment #3) > Comment on attachment 440792 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=440792&action=review > > r=me > > > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py:107 > > + ) > > If we decide to go with invoking decode('utf-8') on output, we may not need > it here because I don't think use output from `_browser_process` anyway. > > > Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:73 > > + **(dict(encoding='utf-8') if sys.version_info >= (3, 0) else dict()) > > I think encoding only available since python3.6. > A most compatible way would be `process.communicate()[0].decode('utf-8')`. +1. We are using decode('utf-8') on pretty much all subprocess output throughout the perf. code
Created attachment 440826 [details] Patch for landing
Committed r283936 (242795@main): <https://commits.webkit.org/242795@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 440826 [details].
Committed r284004 (242847@main): <https://commits.webkit.org/242847@main>