summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-09-05 20:06:02 +0200
committerClaude Paroz <claude@2xlibre.net>2014-09-05 20:06:02 +0200
commit885ff6845e54511022677c1f28b84ddd4f2165dd (patch)
treefd3b2f1bcc32b69178a20b961b8ecffc71b8ab98 /django/utils/datastructures.py
parent5d044339037be879a11b03fe8bd8c3ef1d520b1a (diff)
Revert "Fixed #23384 -- Allowed overriding part of a dictionary-type setting"
This reverts commit 66757fee7e921ad4c35e0b3f80c25e026100b31c. Discussions have led to think that this functionality does not bring significant benefits to justify the added complexity. Read also discussions on ticket #22734.
Diffstat (limited to 'django/utils/datastructures.py')
-rw-r--r--django/utils/datastructures.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index ad8792d192..2efcd00eb0 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -244,26 +244,6 @@ class SortedDict(dict):
self.keyOrder = []
-def dict_merge(a, b):
- """
- Utility to recursively merge two dicts, taking care not to overwrite subkeys
- (which would happen with dict.update), but keeping existing key including
- those from subdictionaries (optionally opted-out if a `_clear_defaults` key
- is present).
- Thanks Ross McFarland (https://www.xormedia.com/recursively-merge-dictionaries-in-python/)
- """
- if b.get('_clear_defaults'):
- return copy.deepcopy(b)
-
- result = copy.deepcopy(a)
- for key, value in six.iteritems(b):
- if key in a and isinstance(result[key], dict):
- result[key] = dict_merge(result[key], value)
- else:
- result[key] = value
- return result
-
-
class OrderedSet(object):
"""
A set which keeps the ordering of the inserted items.