diff options
author | Todd Gamblin <gamblin2@llnl.gov> | 2022-06-10 20:32:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 20:32:35 -0700 |
commit | bf2b30a5f572fbe5a54a72a0a6d14636e59b8c5e (patch) | |
tree | cc78c5edf8fc083df181cc2e477c6d0749b13994 /.gitignore | |
parent | f42680b785765509eba3d43e3cf10d93a8eeca2f (diff) | |
download | spack-bf2b30a5f572fbe5a54a72a0a6d14636e59b8c5e.tar.gz spack-bf2b30a5f572fbe5a54a72a0a6d14636e59b8c5e.tar.bz2 spack-bf2b30a5f572fbe5a54a72a0a6d14636e59b8c5e.tar.xz spack-bf2b30a5f572fbe5a54a72a0a6d14636e59b8c5e.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 '.gitignore')
0 files changed, 0 insertions, 0 deletions