Debian Codegraph @

docs/changelog.rst

raw
1 :doc:`/index`
2
3 Changelog
4 =========
5
6 DeepDiff Changelog
7
8 - v9-0-0
9 - migration note:
10 - `to_dict()` and `to_json()` now accept a `verbose_level` parameter and always return a usable text-view dict. When the original view is `'tree'`, they default to `verbose_level=2` for full detail. The old `view_override` parameter is removed. To get the previous results, you will need to pass the explicit verbose_level to `to_json` and `to_dict` if you are using the tree view.
11 - Dropping support for Python 3.9
12 - Support for python 3.14
13 - Added support for callable ``group_by`` thanks to `echan5 <https://github.com/echan5>`__
14 - Added ``FlatDeltaDict`` TypedDict for ``to_flat_dicts`` return type
15 - Fixed colored view display when all list items are removed thanks to `yannrouillard <https://github.com/yannrouillard>`__
16 - Fixed ``hasattr()`` swallowing ``AttributeError`` in ``__slots__`` handling for objects with ``__getattr__`` thanks to `tpvasconcelos <https://github.com/tpvasconcelos>`__
17 - Fixed ``ignore_order=True`` missing int-vs-float type changes
18 - Always use t1 path for reporting thanks to `devin13cox <https://github.com/devin13cox>`__
19 - Fixed ``_convert_oversized_ints`` failing on NamedTuples
20 - Fixed orjson ``TypeError`` for integers exceeding 64-bit range
21 - Fixed parameter bug in ``to_flat_dicts`` where ``include_action_in_path`` and ``report_type_changes`` were not being passed through
22 - Fixed ``ignore_keys`` issue in ``detailed__dict__`` thanks to `vitalis89 <https://github.com/vitalis89>`__
23 - Fixed logarithmic similarity type hint thanks to `ljames8 <https://github.com/ljames8>`__
24 - Added ``Fraction`` numeric support thanks to `akshat62 <https://github.com/akshat62>`__
25 - v8-6-2
26 - Security fix (CVE-2026-33155): Prevent denial-of-service via crafted pickle payloads that trigger massive memory allocation through the REDUCE opcode. Size-sensitive callables like ``bytes()`` and ``bytearray()`` are now wrapped to reject allocations exceeding 128 MB.
27 - v8-6-1
28 - Patched security vulnerability in the Delta class which was vulnerable to class pollution via its constructor, and when combined with a gadget available in DeltaDiff itself, it could lead to Denial of Service and Remote Code Execution (via insecure Pickle deserialization).
29
30 - v8-6-0
31 - Added Colored View thanks to @mauvilsa
32 - Added support for applying deltas to NamedTuple thanks to @paulsc
33 - Fixed test_delta.py with Python 3.14 thanks to @Romain-Geissler-1A
34 - Added python property serialization to json
35 - Added ip address serialization
36 - Switched to UV from pip
37 - Added Claude.md
38 - Added uuid hashing thanks to @akshat62
39 - Added ``ignore_uuid_types`` flag to DeepDiff to avoid type reports
40 when comparing UUID and string.
41 - Added comprehensive type hints across the codebase (multiple commits
42 for better type safety)
43 - Added support for memoryview serialization
44 - Added support for bytes serialization (non-UTF8 compatible)
45 - Fixed bug where group_by with numbers would leak type info into group
46 path reports
47 - Fixed bug in ``_get_clean_to_keys_mapping`` without explicit
48 significant digits
49 - Added support for python dict key serialization
50 - Enhanced support for IP address serialization with safe module imports
51 - Added development tooling improvements (pyright config, .envrc
52 example)
53 - Updated documentation and development instructions
54
55 - v8-5-0
56 - Updating deprecated pydantic calls
57 - Switching to pyproject.toml
58 - Fix for moving nested tables when using iterable_compare_func. by
59 - Fix recursion depth limit when hashing numpy.datetime64
60 - Moving from legacy setuptools use to pyproject.toml
61
62 - v8-4-2
63 - fixes the type hints for the base
64 - fixes summarize so if json dumps fails, we can still get a repr of the results
65 - adds ipaddress support
66
67 - v8-4-1
68 - Adding BaseOperatorPlus base class for custom operators
69 - default_timezone can be passed now to set your default timezone to something other than UTC.
70 - New summarization algorithm that produces valid json
71 - Better type hint support
72 - Breaking change in DeepHash where we raise Exception instead of logging if we can't hash a value.
73 - Added the log_stacktrace parameter to DeepDiff. When True, it will log the stacktrace along with the error.
74
75 - v8-3-0
76 - Fixed some static typing issues
77 - Added the summarize module for better repr of nested values
78
79
80 - v8-2-0
81 - Small optimizations so we don't load functions that are not needed
82 - Updated the minimum version of Orderly-set
83 - Normalize all datetimes into UTC. Assume timezone naive datetimes are UTC.
84
85
86 - v8-1-0
87
88 - Removing deprecated lines from setup.py
89 - Added ``prefix`` option to ``pretty()``
90 - Fixes hashing of numpy boolean values.
91 - Fixes **slots** comparison when the attribute doesn’t exist.
92 - Relaxing orderly-set reqs
93 - Added Python 3.13 support
94 - Only lower if clean_key is instance of str
95 - Fixes issue where the key deep_distance is not returned when both
96 compared items are equal
97 - Fixes exclude_paths fails to work in certain cases
98 - exclude_paths fails to work
99 - Fixes to_json() method chokes on standard json.dumps() kwargs such as
100 sort_keys
101 - to_dict() method chokes on standard json.dumps() kwargs
102 - Fixes accessing the affected_root_keys property on the diff object
103 returned by DeepDiff fails when one of the dicts is empty
104 - Fixes accessing the affected_root_keys property on the
105 diff object returned by DeepDiff fails when one of the dicts is empty
106
107
108 - v8-0-1
109
110 - Bugfix. Numpy should be optional.
111
112 - v8-0-0
113
114 - With the introduction of `threshold_to_diff_deeper`, the values returned are different than in previous versions of DeepDiff. You can still get the older values by setting `threshold_to_diff_deeper=0`. However to signify that enough has changed in this release that the users need to update the parameters passed to DeepDiff, we will be doing a major version update.
115 - `use_enum_value=True` makes it so when diffing enum, we use the enum's value. It makes it so comparing an enum to a string or any other value is not reported as a type change.
116 - `threshold_to_diff_deeper=float` is a number between 0 and 1. When comparing dictionaries that have a small intersection of keys, we will report the dictionary as a `new_value` instead of reporting individual keys changed. If you set it to zero, you get the same results as DeepDiff 7.0.1 and earlier, which means this feature is disabled. The new default is 0.33 which means if less that one third of keys between dictionaries intersect, report it as a new object.
117 - Deprecated `ordered-set` and switched to `orderly-set`. The `ordered-set` package was not being maintained anymore and starting Python 3.6, there were better options for sets that ordered. I forked one of the new implementations, modified it, and published it as `orderly-set`.
118 - Added `use_log_scale:bool` and `log_scale_similarity_threshold:float`. They can be used to ignore small changes in numbers by comparing their differences in logarithmic space. This is different than ignoring the difference based on significant digits.
119 - json serialization of reversed lists.
120 - Fix for iterable moved items when `iterable_compare_func` is used.
121 - Pandas and Polars support
122
123 - v7-0-1
124
125 - Fixes the translation between Difflib opcodes and Delta flat rows.
126
127 - v7-0-0
128
129 - When verbose=2, return ``new_path`` when the ``path`` and
130 ``new_path`` are different (for example when ignore_order=True and
131 the index of items have changed).
132 - Dropping support for Python 3.7
133 - Introducing serialize to flat rows for delta objects.
134 - fixes the issue with hashing ``datetime.date`` objects where it
135 treated them as numbers instead of dates (fixes #445).
136 - upgrading orjson to the latest version
137 - Fix for bug when diffing two lists with ignore_order and providing
138 compare_func
139 - Fixes “Wrong diff on list of strings” #438
140 - Supporting Python 3.12 in the build process by `Leo
141 Sin <https://github.com/leoslf>`__
142 - Fixes “Instantiating a Delta with a flat_dict_list unexpectedly
143 mutates the flat_dict_list” #457 by
144 `sf-tcalhoun <https://github.com/sf-tcalhoun>`__
145 - Fixes “Error on Delta With None Key and Removed Item from List”
146 #441
147 - Fixes “Error when comparing two nested dicts with 2 added fields”
148 #450
149 - Fixes “Error when subtracting Delta from a dictionary” #443
150
151 - v6-7-1
152
153 - Support for subtracting delta objects when iterable_compare_func
154 is used.
155 - Better handling of force adding a delta to an object.
156 - Fix for
157 ```Can't compare dicts with both single and double quotes in keys`` <https://github.com/seperman/deepdiff/issues/430>`__
158 - Updated docs for Inconsistent Behavior with math_epsilon and
159 ignore_order = True
160
161 - v6-7-0
162
163 - Delta can be subtracted from other objects now.
164 - verify_symmetry is deprecated. Use bidirectional instead.
165 - always_include_values flag in Delta can be enabled to include
166 values in the delta for every change.
167 - Fix for Delta.\__add\_\_ breaks with esoteric dict keys.
168
169 - v6-6-1
170
171 - Fix for `DeepDiff raises decimal exception when using significant
172 digits <https://github.com/seperman/deepdiff/issues/426>`__
173 - Introducing group_by_sort_key
174 - Adding group_by 2D. For example
175 ``group_by=['last_name', 'zip_code']``
176
177 - v6-6-0
178
179 - Numpy 2.0 support
180 - Adding
181 `Delta.to_flat_dicts <https://zepworks.com/deepdiff/current/serialization.html#delta-serialize-to-flat-dictionaries>`__
182
183 - v6-5-0
184
185 - Adding
186 ```parse_path`` <https://github.com/seperman/deepdiff/pull/419>`__
187
188 - v6-4-1
189
190 - Bugfix: Keep Numpy Optional
191
192 - v6-4-0
193
194 - `Add Ignore List Order Option to
195 DeepHash <https://github.com/seperman/deepdiff/pull/403>`__ by
196 `Bobby Morck <https://github.com/bmorck>`__
197 - `pyyaml to 6.0.1 to fix cython build
198 problems <https://github.com/seperman/deepdiff/pull/406>`__ by
199 `Robert Bo Davis <https://github.com/robert-bo-davis>`__
200 - `Precompiled regex simple
201 diff <https://github.com/seperman/deepdiff/pull/413>`__ by
202 `cohml <https://github.com/cohml>`__
203 - New flag: ``zip_ordered_iterables`` for forcing iterable items to
204 be compared one by one.
205
206 - v6-3-1
207
208 - Bugfix deephash for paths by
209 `maggelus <https://github.com/maggelus>`__
210 - Bugfix deephash compiled regex
211 `maggelus <https://github.com/maggelus>`__
212 - Fix tests dependent on toml by
213 `martin-kokos <https://github.com/martin-kokos>`__
214 - Bugfix for ``include_paths`` for nested dictionaries by
215 `kor4ik <https://github.com/kor4ik>`__
216 - Use tomli and tomli-w for dealing with tomli files by
217 `martin-kokos <https://github.com/martin-kokos>`__
218 - Bugfix for ``datetime.date`` by `Alex
219 Sauer-Budge <https://github.com/amsb>`__
220
221 - v6-3-0
222
223 - ``PrefixOrSuffixOperator``: This operator will skip strings that
224 are suffix or prefix of each other.
225 - ``include_obj_callback`` and ``include_obj_callback_strict`` are
226 added by `Håvard Thom <https://github.com/havardthom>`__.
227 - Fixed a corner case where numpy’s ``np.float32`` nans are not
228 ignored when using ``ignore_nan_equality`` by `Noam
229 Gottlieb <https://github.com/noamgot>`__
230 - ``orjson`` becomes optional again.
231 - Fix for ``ignore_type_in_groups`` with numeric values so it does
232 not report number changes when the number types are different.
233
234 - v6-2-3
235
236 - Switching to Orjson for serialization to improve the performance.
237 - Setting ``equal_nan=ignore_nan_inequality`` in the call for
238 ``np.array_equal``
239 - Using Pytest’s tmp_path fixture instead of ``/tmp/``
240
241 - v6-2-2
242
243 - Enum test fix for python 3.11
244 - Adding support for dateutils rrules
245
246 - v6-2-1
247
248 - Removed the print statements.
249
250 - v6-2-0
251
252 - Major improvement in the diff report for lists when items are all
253 hashable and the order of items is important.
254
255 - v6-1-0
256
257 - DeepDiff.affected_paths can be used to get the list of all paths
258 where a change, addition, or deletion was reported for.
259 - DeepDiff.affected_root_keys can be used to get the list of all
260 paths where a change, addition, or deletion was reported for.
261 - Bugfix: ValueError when using Decimal 0.x #339 by `Enric
262 Pou <https://github.com/epou>`__
263 - Serialization of UUID
264
265 - v6-0-0
266
267 - `Exclude obj callback
268 strict <https://github.com/seperman/deepdiff/pull/320/files>`__
269 parameter is added to DeepDiff by Mikhail Khviyuzov
270 `mskhviyu <https://github.com/mskhviyu>`__.
271 - A fix for diffing using ``iterable_compare_func`` with nested
272 objects by `dtorres-sf <https://github.com/dtorres-sf>`__ who
273 originally contributed this feature.
274 - v5-7-0:
275
276 - https://github.com/seperman/deepdiff/pull/284 Bug-Fix: TypeError
277 in \_get_numbers_distance() when ignore_order = True by
278 @Dhanvantari
279 - https://github.com/seperman/deepdiff/pull/280 Add support for
280 UUIDs by @havardthom
281 - Major bug in delta when it comes to iterable items added or
282 removed is investigated by @uwefladrich and resolved by @seperman
283 - v5-6-0: Adding custom operators, and ignore_order_func. Bugfix: verbose_level==0 should disable values_changes. Bugfix: unprocessed key error.
284 - v5-5-0: adding iterable_compare_func for DeepDiff, adding output_format of list for path() in tree view.
285 - v5-4-0: adding strict_checking for numbers in DeepSearch.
286 - v5-3-0: add support for regular expressions in DeepSearch.
287 - v5-2-3: Retaining the order of multiple dictionary items added via Delta. Fixed the typo with yml files in deep cli. Fixing Grep RecursionError where using non UTF-8 character. Allowing kwargs to be passed to to_json method.
288 - v5-2-2: Fixed Delta serialization when None type is present.
289 - v5-2-0: Removed Murmur3 as the preferred hashing method. Using SHA256 by default now. Added commandline for deepdiff. Added group_by. Added math_epsilon. Improved ignoring of NoneType.
290 - v5-0-2: Bug Fix NoneType in ignore type groups https://github.com/seperman/deepdiff/issues/207
291 - v5-0-1: Bug fix to not apply format to non numbers.
292 - v5-0-0: Introducing the Delta object, Improving Numpy support, Fixing tuples comparison when ignore_order=True, Dramatically improving the results when ignore_order=True by running in passes, Introducing pretty print view, deep_distance, purge, progress logging, cache and truncate_datetime.
293 - v4-3-3: Adds support for datetime.time
294 - v4-3-2: Deprecation Warning Enhancement
295 - v4-3-1: Fixing the issue with exclude_path and hash calculations when dictionaries were inside iterables. https://github.com/seperman/deepdiff/issues/174
296 - v4-3-0: adding exclude_obj_callback
297 - v4-2-0: .json property is finally removed. Fix for Py3.10. Dropping support for EOL Python 3.4. Ignoring private keys when calculating hashes. For example __init__ is not a part of hash calculation anymore. Fix for #166 Problem with comparing lists, with an boolean as element.
298 - v4-1-0: .json property is finally removed.
299 - v4-0-9: Fixing the bug for hashing custom unhashable objects
300 - v4-0-8: Adding ignore_nan_inequality for float('nan')
301 - v4-0-7: Hashing of the number 1 vs. True
302 - v4-0-6: found a tiny bug in Python formatting of numbers in scientific notation. Added a workaround.
303 - v4-0-5: Fixing number diffing. Adding number_format_notation and number_to_string_func.
304 - v4-0-4: Adding ignore_string_case and ignore_type_subclasses
305 - v4-0-3: Adding versionbump tool for release
306 - v4-0-2: Fixing installation issue where rst files are missing.
307 - v4-0-1: Fixing installation Tarball missing requirements.txt . DeepDiff v4+ should not show up as pip installable for Py2. Making Murmur3 installation optional.
308 - v4-0-0: Ending Python 2 support, Adding more functionalities and documentation for DeepHash. Switching to Pytest for testing. Switching to Murmur3 128bit for hashing. Fixing classes which inherit from classes with slots didn't have all of their slots compared. Renaming ContentHash to DeepHash. Adding exclude by path and regex path to DeepHash. Adding ignore_type_in_groups. Adding match_string to DeepSearch. Adding Timedelta object diffing.
309 - v3-5-0: Exclude regex path
310 - v3-3-0: Searching for objects and class attributes
311 - v3-2-2: Adding help(deepdiff)
312 - v3-2-1: Fixing hash of None
313 - v3-2-0: Adding grep for search: object | grep(item)
314 - v3-1-3: Unicode vs. Bytes default fix
315 - v3-1-2: NotPresent Fix when item is added or removed.
316 - v3-1-1: Bug fix when item value is None (#58)
317 - v3-1-0: Serialization to/from json
318 - v3-0-0: Introducing Tree View
319 - v2-5-3: Bug fix on logging for content hash.
320 - v2-5-2: Bug fixes on content hash.
321 - v2-5-0: Adding ContentHash module to fix ignore_order once and for all.
322 - v2-1-0: Adding Deep Search. Now you can search for item in an object.
323 - v2-0-0: Exclusion patterns better coverage. Updating docs.
324 - v1-8-0: Exclusion patterns.
325 - v1-7-0: Deep Set comparison.
326 - v1-6-0: Unifying key names. i.e newvalue is new_value now. For backward compatibility, newvalue still works.
327 - v1-5-0: Fixing ignore order containers with unordered items. Adding significant digits when comparing decimals. Changes property is deprecated.
328 - v1-1-0: Changing Set, Dictionary and Object Attribute Add/Removal to be reported as Set instead of List. Adding Pypy compatibility.
329 - v1-0-2: Checking for ImmutableMapping type instead of dict
330 - v1-0-1: Better ignore order support
331 - v1-0-0: Restructuring output to make it more useful. This is NOT backward compatible.
332 - v0-6-1: Fixing iterables with unhashable when order is ignored
333 - v0-6-0: Adding unicode support
334 - v0-5-9: Adding decimal support
335 - v0-5-8: Adding ignore order for unhashables support
336 - v0-5-7: Adding ignore order support
337 - v0-5-6: Adding slots support
338 - v0-5-5: Adding loop detection
339
340
341 Back to :doc:`/index`