)]}' { "commit": "a8921fcaab1a18c8cf7e4ab09ceb940e336918ec", "tree": "5854b9b9b493426b00c0eec02a6e764ca77fac53", "parents": [ "12ef00dfaa08ef6d71355b874162c0da1fa24b3a" ], "author": { "name": "Mike Frysinger", "email": "vapier@chromium.org", "time": "Thu Jul 11 08:22:22 2019" }, "committer": { "name": "Dirk Pranke", "email": "dpranke@chromium.org", "time": "Thu Jul 11 22:44:41 2019" }, "message": "fix encoding issues with inputs for better Python 3 support\n\nWhen running subprocesses like \u0027!\u003c(which foo)\u0027, we return subprocess\u0027s\nstdout contents as bytes, not as a string. Make sure we decode it into\nUTF-8 first.\n\nWhen reading gyp files, we don\u0027t specify an encoding, so the default\nmight be ASCII which breaks when the gyp files contain UTF-8. Change\nit to always read it as a binary stream before decoding to UTF-8.\n\nWith those fixes in place, we need to rework all the type checks for\nstrings \u0026 numbers. Introduce some aliases to the right set of types\nfor the active version of Python, and then change all the type checks\nto use isinstance.\n\nBug: 926296\nTest: building CrOS gyp packages with python3 works again\nTest: `./gyptest.py -a` mostly passes (4 failures look toolchain related)\nChange-Id: I416acf140d01948748f5cc09e966b52f166b82d0\nReviewed-on: https://chromium-review.googlesource.com/c/external/gyp/+/1697943\nReviewed-by: Dirk Pranke \u003cdpranke@chromium.org\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "39bdbbb300f27724b3023141d203a270f70e0df7", "old_mode": 33188, "old_path": "pylib/gyp/input.py", "new_id": "42c279cf49ecadf05c0b6afd28907bb4ac34a05f", "new_mode": 33188, "new_path": "pylib/gyp/input.py" } ] }