This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5b8a260769a2: util: set correct stack level on deprecation 
warnings (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3331?vs=8151&id=8257

REVISION DETAIL
  https://phab.mercurial-scm.org/D3331

AFFECTED FILES
  mercurial/util.py

CHANGE DETAILS

diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -3781,7 +3781,7 @@
         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)
+        nouideprecwarn(msg, version, stacklevel=2)
         return func(*args, **kwargs)
     wrapped.__name__ = func.__name__
     return wrapped



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to