deprecates merge_dicts
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 12 Mar 2010 10:50:37 +0100
changeset 4879 56c16efedc51
parent 4878 2f75a8439338
child 4880 fa6671e83639
deprecates merge_dicts
utils.py
--- a/utils.py	Fri Mar 12 10:49:42 2010 +0100
+++ b/utils.py	Fri Mar 12 10:50:37 2010 +0100
@@ -41,11 +41,6 @@
     return type(str(clsname), (cls,), {'__autogenerated__': True})
 
 
-def merge_dicts(dict1, dict2):
-    """update a copy of `dict1` with `dict2`"""
-    dict1 = dict(dict1)
-    dict1.update(dict2)
-    return dict1
 
 
 # use networkX instead ?
@@ -294,6 +289,7 @@
     __answer[0] = True
     return True
 
+
 try:
     # may not be there if cubicweb-web not installed
     from simplejson import dumps, JSONEncoder
@@ -321,6 +317,14 @@
                 # just return None in those cases.
                 return None
 
+
+@deprecated('[3.7] merge_dicts is deprecated')
+def merge_dicts(dict1, dict2):
+    """update a copy of `dict1` with `dict2`"""
+    dict1 = dict(dict1)
+    dict1.update(dict2)
+    return dict1
+
 from logilab.common import date
 _THIS_MOD_NS = globals()
 for funcname in ('date_range', 'todate', 'todatetime', 'datetime2ticks',