##// END OF EJS Templates
util: deprecate procutil proxy functions (API)...
Yuya Nishihara -
r37139:24ab3381 default
parent child Browse files
Show More
@@ -3772,10 +3772,10 def uvarintdecodestream(fh):
3772 # Deprecation warnings for util.py splitting
3772 # Deprecation warnings for util.py splitting
3773 ###
3773 ###
3774
3774
3775 def _deprecatedfunc(func, version):
3775 def _deprecatedfunc(func, version, modname=None):
3776 def wrapped(*args, **kwargs):
3776 def wrapped(*args, **kwargs):
3777 fn = pycompat.sysbytes(func.__name__)
3777 fn = pycompat.sysbytes(func.__name__)
3778 mn = pycompat.sysbytes(func.__module__)[len('mercurial.'):]
3778 mn = modname or pycompat.sysbytes(func.__module__)[len('mercurial.'):]
3779 msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
3779 msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
3780 nouideprecwarn(msg, version)
3780 nouideprecwarn(msg, version)
3781 return func(*args, **kwargs)
3781 return func(*args, **kwargs)
@@ -3795,46 +3795,55 matchdate = _deprecatedfunc(dateutil.mat
3795 stderr = procutil.stderr
3795 stderr = procutil.stderr
3796 stdin = procutil.stdin
3796 stdin = procutil.stdin
3797 stdout = procutil.stdout
3797 stdout = procutil.stdout
3798 explainexit = procutil.explainexit
3798 explainexit = _deprecatedfunc(procutil.explainexit, '4.6',
3799 findexe = procutil.findexe
3799 modname='utils.procutil')
3800 getuser = procutil.getuser
3800 findexe = _deprecatedfunc(procutil.findexe, '4.6', modname='utils.procutil')
3801 getpid = procutil.getpid
3801 getuser = _deprecatedfunc(procutil.getuser, '4.6', modname='utils.procutil')
3802 hidewindow = procutil.hidewindow
3802 getpid = _deprecatedfunc(procutil.getpid, '4.6', modname='utils.procutil')
3803 popen = procutil.popen
3803 hidewindow = _deprecatedfunc(procutil.hidewindow, '4.6',
3804 quotecommand = procutil.quotecommand
3804 modname='utils.procutil')
3805 readpipe = procutil.readpipe
3805 popen = _deprecatedfunc(procutil.popen, '4.6', modname='utils.procutil')
3806 setbinary = procutil.setbinary
3806 quotecommand = _deprecatedfunc(procutil.quotecommand, '4.6',
3807 setsignalhandler = procutil.setsignalhandler
3807 modname='utils.procutil')
3808 shellquote = procutil.shellquote
3808 readpipe = _deprecatedfunc(procutil.readpipe, '4.6', modname='utils.procutil')
3809 shellsplit = procutil.shellsplit
3809 setbinary = _deprecatedfunc(procutil.setbinary, '4.6', modname='utils.procutil')
3810 spawndetached = procutil.spawndetached
3810 setsignalhandler = _deprecatedfunc(procutil.setsignalhandler, '4.6',
3811 sshargs = procutil.sshargs
3811 modname='utils.procutil')
3812 testpid = procutil.testpid
3812 shellquote = _deprecatedfunc(procutil.shellquote, '4.6',
3813 modname='utils.procutil')
3814 shellsplit = _deprecatedfunc(procutil.shellsplit, '4.6',
3815 modname='utils.procutil')
3816 spawndetached = _deprecatedfunc(procutil.spawndetached, '4.6',
3817 modname='utils.procutil')
3818 sshargs = _deprecatedfunc(procutil.sshargs, '4.6', modname='utils.procutil')
3819 testpid = _deprecatedfunc(procutil.testpid, '4.6', modname='utils.procutil')
3813 try:
3820 try:
3814 setprocname = procutil.setprocname
3821 setprocname = _deprecatedfunc(procutil.setprocname, '4.6',
3822 modname='utils.procutil')
3815 except AttributeError:
3823 except AttributeError:
3816 pass
3824 pass
3817 try:
3825 try:
3818 unblocksignal = procutil.unblocksignal
3826 unblocksignal = _deprecatedfunc(procutil.unblocksignal, '4.6',
3827 modname='utils.procutil')
3819 except AttributeError:
3828 except AttributeError:
3820 pass
3829 pass
3821 closefds = procutil.closefds
3830 closefds = procutil.closefds
3822 isatty = procutil.isatty
3831 isatty = _deprecatedfunc(procutil.isatty, '4.6')
3823 popen2 = procutil.popen2
3832 popen2 = _deprecatedfunc(procutil.popen2, '4.6')
3824 popen3 = procutil.popen3
3833 popen3 = _deprecatedfunc(procutil.popen3, '4.6')
3825 popen4 = procutil.popen4
3834 popen4 = _deprecatedfunc(procutil.popen4, '4.6')
3826 pipefilter = procutil.pipefilter
3835 pipefilter = _deprecatedfunc(procutil.pipefilter, '4.6')
3827 tempfilter = procutil.tempfilter
3836 tempfilter = _deprecatedfunc(procutil.tempfilter, '4.6')
3828 filter = procutil.filter
3837 filter = _deprecatedfunc(procutil.filter, '4.6')
3829 mainfrozen = procutil.mainfrozen
3838 mainfrozen = _deprecatedfunc(procutil.mainfrozen, '4.6')
3830 hgexecutable = procutil.hgexecutable
3839 hgexecutable = _deprecatedfunc(procutil.hgexecutable, '4.6')
3831 isstdin = procutil.isstdin
3840 isstdin = _deprecatedfunc(procutil.isstdin, '4.6')
3832 isstdout = procutil.isstdout
3841 isstdout = _deprecatedfunc(procutil.isstdout, '4.6')
3833 shellenviron = procutil.shellenviron
3842 shellenviron = _deprecatedfunc(procutil.shellenviron, '4.6')
3834 system = procutil.system
3843 system = _deprecatedfunc(procutil.system, '4.6')
3835 gui = procutil.gui
3844 gui = _deprecatedfunc(procutil.gui, '4.6')
3836 hgcmd = procutil.hgcmd
3845 hgcmd = _deprecatedfunc(procutil.hgcmd, '4.6')
3837 rundetached = procutil.rundetached
3846 rundetached = _deprecatedfunc(procutil.rundetached, '4.6')
3838
3847
3839 escapedata = _deprecatedfunc(stringutil.escapedata, '4.6')
3848 escapedata = _deprecatedfunc(stringutil.escapedata, '4.6')
3840 binary = _deprecatedfunc(stringutil.binary, '4.6')
3849 binary = _deprecatedfunc(stringutil.binary, '4.6')
General Comments 0
You need to be logged in to leave comments. Login now