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.
http://zepworks.com
Other
2.03k stars 224 forks source link

Delta constructor fix for flat_dict_list param (pull request back to dev branch) #458

Closed sf-tcalhoun closed 7 months ago

sf-tcalhoun commented 7 months ago

Added fix and unit test for (bug) issue 457, Issue 457

Scenario: We found that when a flat_dict_list was provided as a constructor parameter for instantiating a new delta, the provided flat_dict_list is unexpectedly being mutated/changed, which can be troublesome for the caller if they were expecting the flat_dict_list to be used BY COPY rather than BY REFERENCE.

Intent: Preserve the original value of the flat_dict_list variable within the calling module/function after instantiating the new delta.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.45%. Comparing base (71fde30) to head (a9bfc08).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #458 +/- ## ======================================= Coverage 97.44% 97.45% ======================================= Files 14 14 Lines 3647 3648 +1 ======================================= + Hits 3554 3555 +1 Misses 93 93 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

seperman commented 7 months ago

Thank you for contributing @sf-tcalhoun I will keep you posted when it is released!