deepdiff icon indicating copy to clipboard operation
deepdiff copied to clipboard

pathlib.PosixPath dictionary values not supported

Open simon-liebehenschel opened this issue 3 years ago • 1 comments

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

simon-liebehenschel avatar Mar 02 '21 15:03 simon-liebehenschel

Hi @AIGeneratedUsername Thanks for reporting the issue. I will look into addressing it when I have a chance.

seperman avatar Apr 07 '21 05:04 seperman