diff options
author | Todd Gamblin <gamblin2@llnl.gov> | 2022-06-10 20:32:35 -0700 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-07-20 08:10:41 +0200 |
commit | 6a4d1af5be3f7089c3fc4ba665465a26dcddace0 (patch) | |
tree | ab83a5ea8103f3cd8a9ba25ebe33819973731178 /var | |
parent | 6baf171700d16d106f4b1e3a91058fd24dc3b041 (diff) | |
download | spack-6a4d1af5be3f7089c3fc4ba665465a26dcddace0.tar.gz spack-6a4d1af5be3f7089c3fc4ba665465a26dcddace0.tar.bz2 spack-6a4d1af5be3f7089c3fc4ba665465a26dcddace0.tar.xz spack-6a4d1af5be3f7089c3fc4ba665465a26dcddace0.zip |
bugfix: preserve dict order for `Spec.dag_hash()` in Python 2 (#31092)
Fix a bug introduced in #21720. `spack_json.dump()` calls `_strify()` on dictionaries to
convert `unicode` to `str`, but it constructs `dict` objects instead of
`collections.OrderedDict` objects, so in Python 2 (or earlier versions of 3) it can
scramble dictionary order.
This can cause hashes to differ between Python 2 and Python 3, or between Python 3.7
and earlier Python 3's.
- [x] use `OrderedDict` in `_strify`
- [x] add a regression test
Diffstat (limited to 'var')
0 files changed, 0 insertions, 0 deletions