deepdiff
deepdiff copied to clipboard
pathlib.PosixPath dictionary values not supported
Describe the bug pathlib.PosixPath values are 'unprocessed'
To Reproduce
from deepdiff import DeepDiff
t1 = {'path': PosixPath('/foo/bar/'), }
t2 = {'path': PosixPath('/foo/bar/'), }
ddiff = DeepDiff(t1, t2, ignore_order=True)
Result:
>>> {'unprocessed': ["root['path']: /foo/bar and /foo/bar"]}
Expected behavior
Add support for the pathlib.PosixPath
Additional context
- deepdiff 5.2.3
- Python 3.9
- Lubuntu 20.04
Hi @AIGeneratedUsername Thanks for reporting the issue. I will look into addressing it when I have a chance.