From cc8601355d76d3ee59e0972380fd6de891e32d58 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 12 Feb 2018 20:21:07 +0100 Subject: [PATCH 1/3] DOC: ignore Panel deprecation warnings during doc build --- doc/source/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/source/conf.py b/doc/source/conf.py index c188f83f80250..8d233321a206d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -376,6 +376,11 @@ 'wiki ')} ipython_exec_lines = [ + # ignore all deprecation warnings from Panel + # (to avoid the need to add :okwarning: in many places) + 'import warnings', + 'warnings.filterwarnings("ignore", message="\nPanel is deprecated", category=FutureWarning)' # noqa + # standard imports 'import numpy as np', 'import pandas as pd', # This ensures correct rendering on system with console encoding != utf8 From f32e92371398a9c5c48ff95a0fcf1bfd07d8b579 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Feb 2018 11:31:01 +0100 Subject: [PATCH 2/3] Try to put filterwarnings just in conf.py --- doc/source/conf.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 8d233321a206d..5cf24991369c0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -15,6 +15,8 @@ import re import inspect import importlib +import warnings + from pandas.compat import u, PY3 try: @@ -375,12 +377,15 @@ 'wiki': ('https://github.com/pandas-dev/pandas/wiki/%s', 'wiki ')} + +# ignore all deprecation warnings from Panel during doc build +# (to avoid the need to add :okwarning: in many places) +import warnings +warnings.filterwarnings("ignore", message="\nPanel is deprecated", + category=FutureWarning) + + ipython_exec_lines = [ - # ignore all deprecation warnings from Panel - # (to avoid the need to add :okwarning: in many places) - 'import warnings', - 'warnings.filterwarnings("ignore", message="\nPanel is deprecated", category=FutureWarning)' # noqa - # standard imports 'import numpy as np', 'import pandas as pd', # This ensures correct rendering on system with console encoding != utf8 From 8fd34e8f9eed6952d834aba75da1f97ab561f2d9 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 13 Feb 2018 15:36:19 +0100 Subject: [PATCH 3/3] pep8 --- doc/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 5cf24991369c0..7c4edd0486636 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -380,7 +380,6 @@ # ignore all deprecation warnings from Panel during doc build # (to avoid the need to add :okwarning: in many places) -import warnings warnings.filterwarnings("ignore", message="\nPanel is deprecated", category=FutureWarning)