Patchwork [12,of,12] util: drop _deprecatedfunc()

login
register
mail settings
Submitter Matt Harbison
Date May 11, 2018, 5:11 a.m.
Message ID <d60630f48f95a77231fa.1526015485@Envy>
Download mbox | patch
Permalink /patch/31502/
State Accepted
Headers show

Comments

Matt Harbison - May 11, 2018, 5:11 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1526003012 14400
#      Thu May 10 21:43:32 2018 -0400
# Node ID d60630f48f95a77231faa9694b2099f7797df2d5
# Parent  f49052e7818e9ba5a8637ff7d3da6a8b9f209d6d
util: drop _deprecatedfunc()

It was only needed for the previously removed forwarding.

Patch

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3783,20 +3783,6 @@  def uvarintdecodestream(fh):
             return result
         shift += 7
 
-###
-# Deprecation warnings for util.py splitting
-###
-
-def _deprecatedfunc(func, version, modname=None):
-    def wrapped(*args, **kwargs):
-        fn = pycompat.sysbytes(func.__name__)
-        mn = modname or pycompat.sysbytes(func.__module__)[len('mercurial.'):]
-        msg = "'util.%s' is deprecated, use '%s.%s'" % (fn, mn, fn)
-        nouideprecwarn(msg, version, stacklevel=2)
-        return func(*args, **kwargs)
-    wrapped.__name__ = func.__name__
-    return wrapped
-
 defaultdateformats = dateutil.defaultdateformats
 extendeddateformats = dateutil.extendeddateformats