summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-06-27 15:56:31 +0200
committerFlorian Bruhin <git@the-compiler.org>2018-06-27 16:01:21 +0200
commite9c78b29edf312faeb9d82bd6c0bd576df632cd5 (patch)
treea0d688c6db09b612487fa6ae2b97e7216b4f7227
parent96defc5dc275418c7753f93344066c68e13f69a3 (diff)
downloadqutebrowser-e9c78b29edf312faeb9d82bd6c0bd576df632cd5.tar.gz
qutebrowser-e9c78b29edf312faeb9d82bd6c0bd576df632cd5.zip
Ignore Python 3.7 collections.abc warning
Related issues/PRs: https://github.com/yaml/pyyaml/pull/181 https://github.com/pypa/setuptools/issues/1401 https://github.com/pallets/markupsafe/pull/98 https://github.com/yaml/pyyaml/pull/181 https://github.com/pallets/jinja/pull/867
-rw-r--r--pytest.ini3
-rw-r--r--qutebrowser/utils/log.py5
2 files changed, 8 insertions, 0 deletions
diff --git a/pytest.ini b/pytest.ini
index c897f0be7..452841a6e 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -64,3 +64,6 @@ qt_log_ignore =
^QSettings::value: Empty key passed
^Icon theme ".*" not found
xfail_strict = true
+filterwarnings =
+ # This happens in many qutebrowser dependencies...
+ ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working:DeprecationWarning
diff --git a/qutebrowser/utils/log.py b/qutebrowser/utils/log.py
index 30e570e16..48711614d 100644
--- a/qutebrowser/utils/log.py
+++ b/qutebrowser/utils/log.py
@@ -209,6 +209,11 @@ def _init_py_warnings():
"""Initialize Python warning handling."""
warnings.simplefilter('default')
warnings.filterwarnings('ignore', module='pdb', category=ResourceWarning)
+ # This happens in many qutebrowser dependencies...
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ message="Using or importing the ABCs from "
+ "'collections' instead of from 'collections.abc' "
+ "is deprecated, and in 3.8 it will stop working")
@contextlib.contextmanager