# HG changeset patch # User Sylvain Thénault # Date 1283794657 -7200 # Node ID 33ba2c1dbf103e6893014332f0d3d57e8ccf445e # Parent 104453c4ed3e3ada10b722623a4eb43149579fea [cw.utils] avoid spurious warning, ustrftime may be globally imported diff -r 104453c4ed3e -r 33ba2c1dbf10 utils.py --- a/utils.py Mon Sep 06 19:37:12 2010 +0200 +++ b/utils.py Mon Sep 06 19:37:37 2010 +0200 @@ -335,6 +335,7 @@ else: from logilab.common.date import ustrftime + class CubicWebJsonEncoder(json.JSONEncoder): """define a json encoder to be able to encode yams std types""" @@ -375,7 +376,7 @@ _THIS_MOD_NS = globals() for funcname in ('date_range', 'todate', 'todatetime', 'datetime2ticks', 'days_in_month', 'days_in_year', 'previous_month', - 'next_month', 'first_day', 'last_day', 'ustrftime', + 'next_month', 'first_day', 'last_day', 'strptime'): msg = '[3.6] %s has been moved to logilab.common.date' % funcname _THIS_MOD_NS[funcname] = deprecated(msg)(getattr(date, funcname))