Closed bbushnell95 closed 4 years ago
We are seeing the same issue with DeepDiff 4.0.9
Just ran into this, still happening with 4.2.0
Hi @bbushnell95 Thanks for reporting the issue. Let me take a look at it.
This issue is resolved. v4.3.1 is released.
The exclude_path
in your example needs the list index in it though.
An example can be found in the tests: https://github.com/seperman/deepdiff/blob/master/tests/test_diff_text.py#L1612
The underlying issue was in DeepHash and is fixed in this commit: https://github.com/seperman/deepdiff/commit/eb3973af209e1287b486a5398d76097563652053
Closing this ticket!
Describe the bug When attempting to do a diff between two lists of dictionaries, if ignore_order is defined as True, and exclude_paths is provided, the exclude_paths appears to not be accounted for.
To Reproduce Steps to reproduce the behavior:
obj1 = {'a': 1, 'b': 'randomString', 'e': "1111"} obj2 = {'c': 1, 'd': 'randomString', 'e': 'Cool'}
obj1a = {'a': 1, 'b': 'randomString', 'e': "2222"} obj2a = {'c': 1, 'd': 'randomString', 'e': 'Cool'}
test1 = [obj1, obj2] test2 = [obj2a, obj1a]
exclude_paths = ["root[0]['e']", "root[1]['e']"]
print(DeepDiff(test1, test2, ignore_order=True, report_repetition=True, verbose_level=2, exclude_paths=exclude_paths))
{'iterable_item_added': {'root[1]': {'a': 1, 'b': 'AaPedDefault', 'e': '2222'}}, 'iterable_item_removed': {'root[0]': {'a': 1, 'b': 'AaPedDefault', 'e': '1111'}}}
{}