diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-18 09:53:27 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-18 09:53:27 +0000 |
commit | 4be1620dca24d539573027831b65ffc040bc1ebb (patch) | |
tree | fdd50f947baa072f77db990e1feaf082c2de9083 /morphlib/buildsystem_tests.py | |
parent | e8adedb8f3f27d9212caf277b8e8f7c6792a20c2 (diff) | |
download | morph-4be1620dca24d539573027831b65ffc040bc1ebb.tar.gz |
Revert distbuild parts of "Make our use of json binary path safe"baserock/richardmaw/bugfix/stop-decoding-distbuild-comms
The "unicode fix" worked for the subset of cases relevant, and only
broke distbuild because its tests have not been integrated with ./check,
so the fact that it broke for any string ending with a \ escaped notice,
if you will excuse the pun.
During json.load, the encode option is for specifying the character
encoding of the file or string that is being loaded.
During json.dump, the encode option is for the encoding of `str` keys
and values.
The fact that it worked for the set of cases we cared about is a small
mystery, probably caused by the strings we happened to give it being
valid unicode-escape encoded `str`ings.
A full fix would require either converting all these cases to a
different format, such as YAML, which will handle input data not being
valid Unicode, or pre-processing the data that is passed to `json.dump`
to convert all `str` instances to an appropriately escaped `unicode`,
and converting back on `json.load`, but this is a quick fix to get the
distbuild code working again.
Diffstat (limited to 'morphlib/buildsystem_tests.py')
0 files changed, 0 insertions, 0 deletions