# HG changeset patch # User Augie Fackler # Date 1520182173 18000 # Node ID aa9c5d4479809d63341cb405345988135b14d9ca # Parent 0c431d3129c4b01533b549880c57355349c2cbe4 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 diff -r 0c431d3129c4 -r aa9c5d447980 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