Skip to content
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

exclude_paths fails to work #509

Open
SpecLad opened this issue Nov 20, 2024 · 1 comment
Open

exclude_paths fails to work #509

SpecLad opened this issue Nov 20, 2024 · 1 comment

Comments

@SpecLad
Copy link

SpecLad commented Nov 20, 2024

Describe the bug
Sometimes (I'm not sure what the exact conditions are) DeepDiff detects changes that should have been suppressed by exclude_paths.

To Reproduce
Run this:

from deepdiff import DeepDiff
dd = DeepDiff({}, {'foo': '', 'bar': ''}, exclude_paths=['foo', 'bar'])
print(dd)

It prints:

{'values_changed': {'root': {'new_value': {'foo': '', 'bar': ''}, 'old_value': {}}}}

Expected behavior
It should print:

{}

OS, DeepDiff version and Python version (please complete the following information):

  • OS: Ubuntu
  • Version 22.04.5
  • Python Version 3.10.12
  • DeepDiff Version 8.0.1

Additional context
This is a regression that was introduced in release 8.0.0, and specifically in this commit: ff6ff87. Since there are no numeric values in this test case, and I didn't enable use_log_scale anyway, it doesn't seem like an intentional change.

@seperman
Copy link
Owner

Hi @SpecLad
Yes, the change of behavior is due to the introduction of threshold_to_diff_deeper. Looking into it.

seperman added a commit that referenced this issue Dec 15, 2024
@seperman seperman mentioned this issue Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants