changeset 36128:02ed94dd9fd6

util: call warnings.warn() with a sysstr in nouideprecwarn This preserves nouideprecwarn wanting a bytes, which is consistent with the rest of hg. Differential Revision: https://phab.mercurial-scm.org/D2210
author Augie Fackler <augie@google.com>
date Mon, 12 Feb 2018 20:43:05 -0500
parents df1760b58fda
children 2874896a6e3b
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Feb 12 20:42:28 2018 -0500
+++ b/mercurial/util.py	Mon Feb 12 20:43:05 2018 -0500
@@ -253,7 +253,7 @@
     if _dowarn:
         msg += ("\n(compatibility will be dropped after Mercurial-%s,"
                 " update your code.)") % version
-        warnings.warn(msg, DeprecationWarning, stacklevel + 1)
+        warnings.warn(pycompat.sysstr(msg), DeprecationWarning, stacklevel + 1)
 
 DIGESTS = {
     'md5': hashlib.md5,