mercurial/util.py
changeset 31952 a34b5e7c6683
parent 31950 cc70c6dbac30
child 32123 5f53c267e362
child 32572 377c74ef008d
equal deleted inserted replaced
31951:f23d579a5a04 31952:a34b5e7c6683
   166     #
   166     #
   167     # The option of setting PYTHONWARNINGS in the test runner was investigated.
   167     # The option of setting PYTHONWARNINGS in the test runner was investigated.
   168     # However, module name set through PYTHONWARNINGS was exactly matched, so
   168     # However, module name set through PYTHONWARNINGS was exactly matched, so
   169     # we cannot set 'mercurial' and have it match eg: 'mercurial.scmutil'. This
   169     # we cannot set 'mercurial' and have it match eg: 'mercurial.scmutil'. This
   170     # makes the whole PYTHONWARNINGS thing useless for our usecase.
   170     # makes the whole PYTHONWARNINGS thing useless for our usecase.
   171     warnings.filterwarnings('default', '', DeprecationWarning, 'mercurial')
   171     warnings.filterwarnings(r'default', r'', DeprecationWarning, r'mercurial')
   172     warnings.filterwarnings('default', '', DeprecationWarning, 'hgext')
   172     warnings.filterwarnings(r'default', r'', DeprecationWarning, r'hgext')
   173     warnings.filterwarnings('default', '', DeprecationWarning, 'hgext3rd')
   173     warnings.filterwarnings(r'default', r'', DeprecationWarning, r'hgext3rd')
   174 
   174 
   175 def nouideprecwarn(msg, version, stacklevel=1):
   175 def nouideprecwarn(msg, version, stacklevel=1):
   176     """Issue an python native deprecation warning
   176     """Issue an python native deprecation warning
   177 
   177 
   178     This is a noop outside of tests, use 'ui.deprecwarn' when possible.
   178     This is a noop outside of tests, use 'ui.deprecwarn' when possible.