util: also silence py3 warnings from codec module
authorAugie Fackler <augie@google.com>
Sun, 04 Mar 2018 11:49:33 -0500
changeset 36699 aa9c5d447980
parent 36696 0c431d3129c4
child 36700 e437de3881c1
util: also silence py3 warnings from codec module Fixes warnings like this: + mercurial/util.py:2446: DeprecationWarning: invalid escape sequence '\d' + return codecs.escape_decode(s)[0] Differential Revision: https://phab.mercurial-scm.org/D2642
mercurial/util.py
--- a/mercurial/util.py	Thu Feb 15 18:05:58 2018 -0800
+++ b/mercurial/util.py	Sun Mar 04 11:49:33 2018 -0500
@@ -249,6 +249,8 @@
     # silence warning emitted by passing user string to re.sub()
     warnings.filterwarnings(r'ignore', r'bad escape', DeprecationWarning,
                             r'mercurial')
+    warnings.filterwarnings(r'ignore', r'invalid escape sequence',
+                            DeprecationWarning, r'mercurial')
 
 def nouideprecwarn(msg, version, stacklevel=1):
     """Issue an python native deprecation warning