Ignore Python 3.6 warnings in dependencies

This commit is contained in:
Florian Bruhin 2017-01-08 22:15:39 +01:00
parent 2127fd2432
commit 2d364f43cf

View File

@ -200,6 +200,22 @@ def _init_py_warnings():
"""Initialize Python warning handling."""
warnings.simplefilter('default')
warnings.filterwarnings('ignore', module='pdb', category=ResourceWarning)
# https://github.com/pallets/jinja/pull/628
warnings.filterwarnings('ignore', module=r'jinja2\.filters',
category=DeprecationWarning,
message='Flags not at the start of the expression')
# https://bitbucket.org/birkenfeld/pygments-main/issues/1314/
warnings.filterwarnings('ignore', module=r'pygments\.util',
category=DeprecationWarning,
message='Flags not at the start of the expression')
# https://github.com/pallets/jinja/issues/646
warnings.filterwarnings('ignore', module='jinja2\..*',
category=DeprecationWarning,
message='invalid escape sequence')
# https://bitbucket.org/fdik/pypeg/commits/dd15ca462b532019c0a3be1d39b8ee2f3fa32f4e
warnings.filterwarnings('ignore', module='pypeg2',
category=DeprecationWarning,
message='invalid escape sequence')
@contextlib.contextmanager