--- 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',