diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -168,9 +168,9 @@ if _dowarn: # However, module name set through PYTHONWARNINGS was exactly matched, so # we cannot set 'mercurial' and have it match eg: 'mercurial.scmutil'. This # makes the whole PYTHONWARNINGS thing useless for our usecase. - warnings.filterwarnings('default', '', DeprecationWarning, 'mercurial') - warnings.filterwarnings('default', '', DeprecationWarning, 'hgext') - warnings.filterwarnings('default', '', DeprecationWarning, 'hgext3rd') + warnings.filterwarnings(r'default', r'', DeprecationWarning, r'mercurial') + warnings.filterwarnings(r'default', r'', DeprecationWarning, r'hgext') + warnings.filterwarnings(r'default', r'', DeprecationWarning, r'hgext3rd') def nouideprecwarn(msg, version, stacklevel=1): """Issue an python native deprecation warning