Cache.set preserves key order when saving dicts (#9206)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Cristian Vera
2021-10-18 19:15:34 -03:00
committed by GitHub
parent 0696d3eda1
commit cbcfeca78c
4 changed files with 14 additions and 1 deletions

View File

@@ -193,7 +193,7 @@ class Cache:
return
if not cache_dir_exists_already:
self._ensure_supporting_files()
data = json.dumps(value, indent=2, sort_keys=True)
data = json.dumps(value, indent=2)
try:
f = path.open("w")
except OSError: