From 2d364f43cf8283d3802f9ab00b09208018e0aa8c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 8 Jan 2017 22:15:39 +0100 Subject: [PATCH] Ignore Python 3.6 warnings in dependencies --- qutebrowser/utils/log.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py index 07ec78741..91593e569 100644 --- a/qutebrowser/utils/log.py +++ b/qutebrowser/utils/log.py @@ -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