equal
deleted
inserted
replaced
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 |