mercurial/util.py
changeset 37675 5b8a260769a2
parent 37496 1765ed63db40
child 37801 5cab6f5016fa
equal deleted inserted replaced
37674:f83cb91b052e 37675:5b8a260769a2
  3779 def _deprecatedfunc(func, version, modname=None):
  3779 def _deprecatedfunc(func, version, modname=None):
  3780     def wrapped(*args, **kwargs):
  3780     def wrapped(*args, **kwargs):
  3781         fn = pycompat.sysbytes(func.__name__)
  3781         fn = pycompat.sysbytes(func.__name__)
  3782         mn = modname or pycompat.sysbytes(func.__module__)[len('mercurial.'):]
  3782         mn = modname or pycompat.sysbytes(func.__module__)[len('mercurial.'):]
  3783         msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
  3783         msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
  3784         nouideprecwarn(msg, version)
  3784         nouideprecwarn(msg, version, stacklevel=2)
  3785         return func(*args, **kwargs)
  3785         return func(*args, **kwargs)
  3786     wrapped.__name__ = func.__name__
  3786     wrapped.__name__ = func.__name__
  3787     return wrapped
  3787     return wrapped
  3788 
  3788 
  3789 defaultdateformats = dateutil.defaultdateformats
  3789 defaultdateformats = dateutil.defaultdateformats