Skip to content

Commit 737bb5a

Browse files
committed
updating docs
1 parent c464e04 commit 737bb5a

File tree

6 files changed

+91
-5
lines changed

6 files changed

+91
-5
lines changed

AUTHORS.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,12 @@ Authors in order of the timeline of their contributions:
6363
- [sf-tcalhoun](https://github.com/sf-tcalhoun) for fixing "Instantiating a Delta with a flat_dict_list unexpectedly mutates the flat_dict_list"
6464
- [dtorres-sf](https://github.com/dtorres-sf) for fixing iterable moved items when iterable_compare_func is used.
6565
- [Florian Finkernagel](https://github.com/TyberiusPrime) for pandas and polars support.
66-
- Mathis Chenuet [artemisart](https://github.com/artemisart) for fixing slots classes comparison.
67-
- [Aaron D. Marasco](https://github.com/AaronDMarasco) added `prefix` option to `pretty()`
66+
- Mathis Chenuet [artemisart](https://github.com/artemisart) for fixing slots classes comparison and PR review.
67+
- Sherjeel Shabih [sherjeelshabih](https://github.com/sherjeelshabih) for fixing the issue where the key deep_distance is not returned when both compared items are equal #510
68+
- [Aaron D. Marasco](https://github.com/AaronDMarasco) for adding `prefix` option to `pretty()`
69+
- [Juergen Skrotzky](https://github.com/Jorgen-VikingGod) for adding empty `py.typed`
70+
- [Mate Valko](https://github.com/vmatt) for fixing the issue so we lower only if clean_key is instance of str via #504
71+
- [jlaba](https://github.com/jlaba) for fixing #493 include_paths, when only certain keys are included via #499
72+
- [Doron Behar](https://github.com/doronbehar) for fixing DeepHash for numpy booleans via #496
73+
- [Aaron D. Marasco](https://github.com/AaronDMarasco) for adding print() options which allows a user-defined string (or callback function) to prefix every output when using the pretty() call.
74+
- [David Hotham](https://github.com/dimbleby) for relaxing orderly-set dependency via #486

CHANGELOG.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22

33

44
- v8-1-0
5-
- Fixed slots-classes comparison.
5+
- Removing deprecated lines from setup.py
66
- Added `prefix` option to `pretty()`
7-
- Relax `orderly-set` dependency.
87
- Fixes hashing of numpy boolean values.
8+
- Fixes __slots__ comparison when the attribute doesn't exist.
9+
- Relaxing orderly-set reqs
10+
- Added Python 3.13 support
11+
- Only lower if clean_key is instance of str
12+
- Only lower if clean_key is instance of str #504
13+
- Fixes issue where the key deep_distance is not returned when both compared items are equal
14+
- Fixes issue where the key deep_distance is not returned when both compared items are equal #510
15+
- Fixes exclude_paths fails to work in certain cases
16+
- exclude_paths fails to work #509
17+
- Fixes to_json() method chokes on standard json.dumps() kwargs such as sort_keys
18+
- to_dict() method chokes on standard json.dumps() kwargs #490
19+
- Fixes accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty
20+
- In version 8.0.1, accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty #508
21+
922

1023
- v8-0-1
1124
- Bugfix. Numpy should be optional.

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,25 @@ Tested on Python 3.8+ and PyPy3.
2323

2424
Please check the [ChangeLog](CHANGELOG.md) file for the detailed information.
2525

26+
DeepDiff 8-1-0
27+
28+
- Removing deprecated lines from setup.py
29+
- Added `prefix` option to `pretty()`
30+
- Fixes hashing of numpy boolean values.
31+
- Fixes __slots__ comparison when the attribute doesn't exist.
32+
- Relaxing orderly-set reqs
33+
- Added Python 3.13 support
34+
- Only lower if clean_key is instance of str
35+
- Only lower if clean_key is instance of str #504
36+
- Fixes issue where the key deep_distance is not returned when both compared items are equal
37+
- Fixes issue where the key deep_distance is not returned when both compared items are equal #510
38+
- Fixes exclude_paths fails to work in certain cases
39+
- exclude_paths fails to work #509
40+
- Fixes to_json() method chokes on standard json.dumps() kwargs such as sort_keys
41+
- to_dict() method chokes on standard json.dumps() kwargs #490
42+
- Fixes accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty
43+
- In version 8.0.1, accessing the affected_root_keys property on the diff object returned by DeepDiff fails when one of the dicts is empty #508
44+
2645
DeepDiff 8-0-1
2746

2847
- Bugfix. Numpy should be optional.

deepdiff/serialization.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from copy import deepcopy, copy
4545
from functools import partial
4646
from collections.abc import Mapping
47+
from typing import Callable
4748
from deepdiff.helper import (
4849
strings,
4950
get_type,
@@ -306,11 +307,13 @@ def _to_delta_dict(self, directed=True, report_repetition_required=True, always_
306307

307308
return deepcopy(dict(result))
308309

309-
def pretty(self, prefix=None):
310+
def pretty(self, prefix: str | Callable=None):
310311
"""
311312
The pretty human readable string output for the diff object
312313
regardless of what view was used to generate the diff.
313314
315+
prefix can be a callable or a string or None.
316+
314317
Example:
315318
>>> t1={1,2,4}
316319
>>> t2={2,3}

docs/authors.rst

+18
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,24 @@ Authors in order of the timeline of their contributions:
9393
moved items when iterable_compare_func is used.
9494
- `Florian Finkernagel <https://github.com/TyberiusPrime>`__ for pandas
9595
and polars support.
96+
- Mathis Chenuet `artemisart <https://github.com/artemisart>`__ for
97+
fixing slots classes comparison and PR review.
98+
- Sherjeel Shabih `sherjeelshabih <https://github.com/sherjeelshabih>`__
99+
for fixing the issue where the key deep_distance is not returned when
100+
both compared items are equal #510
101+
- `Juergen Skrotzky <https://github.com/Jorgen-VikingGod>`__ for adding
102+
empty ``py.typed``
103+
- `Mate Valko <https://github.com/vmatt>`__ for fixing the issue so we
104+
lower only if clean_key is instance of str via #504
105+
- `jlaba <https://github.com/jlaba>`__ for fixing #493 include_paths,
106+
when only certain keys are included via #499
107+
- `Doron Behar <https://github.com/doronbehar>`__ for fixing DeepHash
108+
for numpy booleans via #496
109+
- `Aaron D. Marasco <https://github.com/AaronDMarasco>`__ for adding
110+
print() options which allows a user-defined string (or callback
111+
function) to prefix every output when using the pretty() call.
112+
- `David Hotham <https://github.com/dimbleby>`__ for relaxing
113+
orderly-set dependency via #486
96114

97115
.. _Sep Dehpour (Seperman): http://www.zepworks.com
98116
.. _Victor Hahn Castell: http://hahncastell.de

docs/index.rst

+26
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,32 @@ The DeepDiff library includes the following modules:
3131
What Is New
3232
***********
3333

34+
DeepDiff v8-1-0
35+
36+
- Removing deprecated lines from setup.py
37+
- Added ``prefix`` option to ``pretty()``
38+
- Fixes hashing of numpy boolean values.
39+
- Fixes **slots** comparison when the attribute doesn’t exist.
40+
- Relaxing orderly-set reqs
41+
- Added Python 3.13 support
42+
- Only lower if clean_key is instance of str
43+
- Only lower if clean_key is instance of str #504
44+
- Fixes issue where the key deep_distance is not returned when both
45+
compared items are equal
46+
- Fixes issue where the key deep_distance is not returned when both
47+
compared items are equal #510
48+
- Fixes exclude_paths fails to work in certain cases
49+
- exclude_paths fails to work #509
50+
- Fixes to_json() method chokes on standard json.dumps() kwargs such
51+
as sort_keys
52+
- to_dict() method chokes on standard json.dumps() kwargs #490
53+
- Fixes accessing the affected_root_keys property on the diff object
54+
returned by DeepDiff fails when one of the dicts is empty
55+
- In version 8.0.1, accessing the affected_root_keys property on the
56+
diff object returned by DeepDiff fails when one of the dicts is
57+
empty #508
58+
59+
3460
DeepDiff 8-0-1
3561

3662
- Bugfix. Numpy should be optional.

0 commit comments

Comments
 (0)