changeset 31952:a34b5e7c6683

util: pass sysstrs to warnings.filterwarnings Un-breaks the Python 3 build.
author Augie Fackler <augie@google.com>
date Thu, 13 Apr 2017 13:12:49 -0400
parents f23d579a5a04
children cc2382b60007
files mercurial/util.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Mon Apr 03 14:21:38 2017 +0200
+++ b/mercurial/util.py	Thu Apr 13 13:12:49 2017 -0400
@@ -168,9 +168,9 @@
     # 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