-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectId is not checked during DeepDiff() #381
Comments
Hi,I don’t use Mongodb. Most likely these are C objects that don’t provide a standard Python object interface that DeepDiff can use to compare them. That’s why when you convert them to strings, they work.On Mar 20, 2023, at 2:34 AM, Patryk Matis ***@***.***> wrote:
Describe the bug
DeepDiff is not pointing out different objectIds (bson/mongodb) in dicts.
To Reproduce
Create two dicts with two different ObjectId inside of them and use DeepDiff()
Expected behavior
{'old_value': ObjectId('64131f792bbc01b7f84f1dd7'), 'new_value': ObjectId('64131f792bbc01b7f84f1db1'}
OS, DeepDiff version and Python version (please complete the following information):
OS: Win11/WSL
Python Version 3.9.16
DeepDiff Version 6.3.0
Additional context
Parsing these objectIds to a string using str() works well, but this is just a workaround
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I wonder if we need to provide some sort of API for people to be able to register objects like above to DeepHash and let it know how it should be computing their hash. Something like |
Hi @patryk-matis |
I have the same problem: |
Describe the bug
DeepDiff is not pointing out different objectIds (bson/mongodb) in dicts.
To Reproduce
Create two dicts with two different ObjectId inside of them and use DeepDiff()
Expected behavior
{'old_value': ObjectId('64131f792bbc01b7f84f1dd7'), 'new_value': ObjectId('64131f792bbc01b7f84f1db1'}
OS, DeepDiff version and Python version (please complete the following information):
Additional context
Parsing these objectIds to a string using str() works well, but this is just a workaround
The text was updated successfully, but these errors were encountered: