[wptrunner] Two small fixes for python3 compatibility#24993
[wptrunner] Two small fixes for python3 compatibility#24993stephenmcgruer merged 1 commit intomasterfrom
Conversation
|
So there are a bunch more bugs in the |
23a12b6 to
c763896
Compare
|
Looking at https://github.com/web-platform-tests/wpt/blob/master/tools/wptrunner/wptrunner/update/tree.py , I see mostly (if not all) native strings when interacting with git output. Shall we perhaps always decode in |
|
I think the hg code for tree.py was almost never used, but the git code maybe was for gecko (historically) and Servo (possibly still). It's definitely not very well maintained though. |
I thought about this, but wasn't sure. It is reasonable to expect both |
|
I'm going to go ahead and merge this, since it tripped me up when recently trying to run MacOS + Py3 again. |
Not sure about hg, but git is almost encoding-agnostic, so assuming UTF-8 isn't technically correct, sigh...
LGTM |
These were discovered in #24952,
but apply equally to other platforms. There are two fixes here:
is_git_rootin vcs.py, compare bytes against bytes, rather than against stringThe first of these would cause us to always return None for the revision in Python 3, because
is_git_rootwould always be false. After that was fixed, the latter was discovered where we would write bytes into the WPTTest information, which we would later try to dump as JSON - which fails for byte data.