@@ -65,7 +65,6 @@ def _report_progress(_stats, progress_logger, duration): |
65 | 65 | PASSES_COUNT = 'PASSES COUNT' |
66 | 66 | MAX_PASS_LIMIT_REACHED = 'MAX PASS LIMIT REACHED' |
67 | 67 | MAX_DIFF_LIMIT_REACHED = 'MAX DIFF LIMIT REACHED' |
68 | | -INPROGRESS = 'INPROGRESS' |
69 | 68 | CANT_FIND_NUMPY_MSG = 'Unable to import numpy. This must be a bug in DeepDiff since a numpy array is detected.' |
70 | 69 | INVALID_VIEW_MSG = 'The only valid values for the view parameter are text and tree. But {} was passed.' |
71 | 70 | CUTOFF_RANGE_ERROR_MSG = 'cutoff_distance_for_pairs needs to be a positive float max 1.' |
@@ -697,16 +696,8 @@ def __get_and_cache_rough_distance( |
697 | 696 | if cache_key in self._cache: |
698 | 697 | self._stats[DISTANCE_CACHE_HIT_COUNT] += 1 |
699 | 698 | _current_value = self._cache.get(cache_key) |
700 | | - # We are in a self loop. Get out now! |
701 | | - if _current_value == INPROGRESS: |
702 | | - _distance = 1 |
703 | | - else: |
704 | | - _distance = _current_value |
| 699 | + _distance = _current_value |
705 | 700 | else: |
706 | | - # Marking the cache as in progress so we avoid calculating the same distance |
707 | | - # as a part of the distance calculations. Basically to avoid getting stuck when there is a loop |
708 | | - # in the object. |
709 | | - self._cache.set(cache_key, value=INPROGRESS) |
710 | 701 | # We can only cache the rough distance and not the actual diff result for reuse. |
711 | 702 | # The reason is that we have modified the parameters explicitly so they are different and can't |
712 | 703 | # be used for diff reporting |
|