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