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
--- 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