deepdiff
deepdiff copied to clipboard
DeepDiff: Deep Difference and search of any Python object/data. DeepHash: Hash of any object based on its contents. Delta: Use deltas to reconstruct objects by adding deltas together.
Fixes #394. I recently ran into an issue where my pipipegraph2 failed to to recalculate nodes downstream of a changed output because deepdiff assigned the same hash to different DataFrames....
DeepDiff reports all datetime timezones as equal ``` import datetime import deepdiff a = datetime.timezone.utc b = datetime.timezone(datetime.timedelta(hours=1)) c = datetime.timezone(datetime.timedelta(hours=2)) d = datetime.timezone(datetime.timedelta(hours=1)) deepdiff.DeepDiff(a, b) Out: {} a ==...
**Describe the bug** `DeepDiff` cannot compare two zero-dimensional `ndarray`s (i.e., shape is ()). **To Reproduce** ``` import numpy as np from deepdiff import DeepDiff a1 = np.array((1)) a2 = np.array((2))...
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I'm trying to compare...
**Describe the bug** This is a build issue where importing `deepdiff.DeepDiff` results in: ``` ... from deepdiff import DeepDiff venv/lib/python3.11/site-packages/deepdiff/__init__.py:10: in from .diff import DeepDiff venv/lib/python3.11/site-packages/deepdiff/diff.py:30: in from deepdiff.distance import...
**Is your feature request related to a problem? Please describe.** Some databases (e.g. Mongo) store date/time to millisecond precision. Being able to truncate to this would be useful, and a...
When I pickle the diff and then unpickle and try to subtract delta created from diff, I get error. I added prinst statements to your code starting at 'Line 571...
**Describe the bug** Tests fail in Fedora rawhide ``` =================================== FAILURES =================================== _ TestCommands.test_diff_command[t1_corrupt.json-t2.json-Expecting property name enclosed in double quotes-1] _ self = t1 = '/builddir/build/BUILD/python-deepdiff-7.0.1-build/deepdiff-7.0.1/tests/fixtures/t1_corrupt.json' t2 = '/builddir/build/BUILD/python-deepdiff-7.0.1-build/deepdiff-7.0.1/tests/fixtures/t2.json' expected_in_stdout...
**To Reproduce** I can reproduce this issue with deepdiff >= 6.7.0. For example: ``` $ pip install deepdiff==6.7.0 $ python. -c 'import deepdiff; from deepdiff import DeepDiff; print(DeepDiff(t1={b"foo": 1}, t2={b"foobar":...
**Describe the bug** The parameter `exclude_regex_paths` does not work correctly with regular expressions including $ When I check the source code, I found the following code in diff.py line 481:...