I'm running into an issue where I'm losing the sort order of a dict object when storing it with the config.cache:
request.config.cache.set('foo', {'b':1,'a':2})
print(request.config.cache.get('foo', None))
Returns:
This issue is caused by the sort_keys parameter here:
|
data = json.dumps(value, indent=2, sort_keys=True) |
I'm assuming this was written with Python 2.x in mind, but now that Python 3.x dict is sorted this is causing an issue. Could this be removed so that sort order is maintained?
I'm running into an issue where I'm losing the sort order of a
dictobject when storing it with theconfig.cache:Returns:
This issue is caused by the
sort_keysparameter here:pytest/src/_pytest/cacheprovider.py
Line 196 in 5fc7b21
I'm assuming this was written with Python 2.x in mind, but now that Python 3.x
dictis sorted this is causing an issue. Could this be removed so that sort order is maintained?