utils.py
changeset 7990 a673d1d9a738
parent 7956 db49658b2812
child 7998 9ef285eb20f4
equal deleted inserted replaced
7989:db76e8aaec29 7990:a673d1d9a738
   546     """update a copy of `dict1` with `dict2`"""
   546     """update a copy of `dict1` with `dict2`"""
   547     dict1 = dict(dict1)
   547     dict1 = dict(dict1)
   548     dict1.update(dict2)
   548     dict1.update(dict2)
   549     return dict1
   549     return dict1
   550 
   550 
   551 from logilab.common import date
       
   552 _THIS_MOD_NS = globals()
       
   553 for funcname in ('date_range', 'todate', 'todatetime', 'datetime2ticks',
       
   554                  'days_in_month', 'days_in_year', 'previous_month',
       
   555                  'next_month', 'first_day', 'last_day',
       
   556                  'strptime'):
       
   557     msg = '[3.6] %s has been moved to logilab.common.date' % funcname
       
   558     _THIS_MOD_NS[funcname] = deprecated(msg)(getattr(date, funcname))
       
   559 
       
   560 
   551 
   561 logger = getLogger('cubicweb.utils')
   552 logger = getLogger('cubicweb.utils')
   562 
   553 
   563 class QueryCache(object):
   554 class QueryCache(object):
   564     """ a minimalist dict-like object to be used by the querier
   555     """ a minimalist dict-like object to be used by the querier