comparison mercurial/util.py @ 38010:f81a51d8fedf

util: drop _deprecatedfunc() It was only needed for the previously removed forwarding.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 10 May 2018 21:43:32 -0400
parents 70f45f28c04e
children 59f1e33f74a6
comparison
equal deleted inserted replaced
38009:70f45f28c04e 38010:f81a51d8fedf
3781 result |= ((byte & 0x7f) << shift) 3781 result |= ((byte & 0x7f) << shift)
3782 if not (byte & 0x80): 3782 if not (byte & 0x80):
3783 return result 3783 return result
3784 shift += 7 3784 shift += 7
3785 3785
3786 ###
3787 # Deprecation warnings for util.py splitting
3788 ###
3789
3790 def _deprecatedfunc(func, version, modname=None):
3791 def wrapped(*args, **kwargs):
3792 fn = pycompat.sysbytes(func.__name__)
3793 mn = modname or pycompat.sysbytes(func.__module__)[len('mercurial.'):]
3794 msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
3795 nouideprecwarn(msg, version, stacklevel=2)
3796 return func(*args, **kwargs)
3797 wrapped.__name__ = func.__name__
3798 return wrapped
3799
3800 defaultdateformats = dateutil.defaultdateformats 3786 defaultdateformats = dateutil.defaultdateformats
3801 extendeddateformats = dateutil.extendeddateformats 3787 extendeddateformats = dateutil.extendeddateformats
3802 3788
3803 stderr = procutil.stderr 3789 stderr = procutil.stderr
3804 stdin = procutil.stdin 3790 stdin = procutil.stdin