seperman / deepdiff

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.

Home Page:http://zepworks.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hashes for all pathlib.Path objects are identical

maggelus opened this issue · comments

When hashing a pathlib.Path object, they all have the same hash value, regardless of the actual path.

To Reproduce
a = Path('testdir')
b = Path('testdir2')
a_hash = DeepHash(a)[a]
b_hash = DeepHash(b)[b]
assert a_hash != b_hash

Expected behavior
Hashes for different Paths should be different.

Hi @maggelus
Thanks for the PR you made for this issue. Closing.