From 57866a40f71087e36b17df54788b48056690a94a Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Mon, 20 May 2019 16:06:51 -0700 Subject: [PATCH 1/2] CLN: pd.options.html.border --- doc/source/whatsnew/v0.25.0.rst | 2 +- pandas/core/config_init.py | 9 --------- pandas/core/frame.py | 2 +- pandas/io/formats/format.py | 2 +- pandas/tests/io/formats/test_to_html.py | 6 ------ 5 files changed, 3 insertions(+), 18 deletions(-) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 30bc332f8a04b..d5734612655a0 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -271,7 +271,7 @@ Removal of prior version deprecations/changes - Removed ``Panel`` (:issue:`25047`, :issue:`25191`, :issue:`25231`) - - -- +- Removed previously deprecated ``pd.options.html.border`` (:issue:`16970`) .. _whatsnew_0250.performance: diff --git a/pandas/core/config_init.py b/pandas/core/config_init.py index dc63b15cf9c13..de2128ef21dc3 100644 --- a/pandas/core/config_init.py +++ b/pandas/core/config_init.py @@ -185,11 +185,6 @@ def use_numexpr_cb(key): for the DataFrame HTML repr. """ -pc_html_border_deprecation_warning = """\ -html.border has been deprecated, use display.html.border instead -(currently both are identical) -""" - pc_html_use_mathjax_doc = """\ : boolean When True, Jupyter notebook will process table contents using MathJax, @@ -367,10 +362,6 @@ def is_terminal(): cf.register_option('border', 1, pc_html_border_doc, validator=is_int) -cf.deprecate_option('html.border', msg=pc_html_border_deprecation_warning, - rkey='display.html.border') - - tc_sim_interactive_doc = """ : boolean Whether to simulate interactive mode for purposes of testing diff --git a/pandas/core/frame.py b/pandas/core/frame.py index afe37bf198ab7..f225f8501b33b 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2150,7 +2150,7 @@ def to_html(self, buf=None, columns=None, col_space=None, header=True, Whether the generated HTML is for IPython Notebook. border : int A ``border=border`` attribute is included in the opening - `` tag. Default ``pd.options.html.border``. + `
` tag. Default ``pd.options.display.html.border``. .. versionadded:: 0.19.0 diff --git a/pandas/io/formats/format.py b/pandas/io/formats/format.py index 1c1acebb8f8f7..765b31f294bcb 100644 --- a/pandas/io/formats/format.py +++ b/pandas/io/formats/format.py @@ -729,7 +729,7 @@ def to_html(self, classes=None, notebook=False, border=None): Whether the generated HTML is for IPython Notebook. border : int A ``border=border`` attribute is included in the opening - ``
`` tag. Default ``pd.options.html.border``. + ``
`` tag. Default ``pd.options.display.html.border``. .. versionadded:: 0.19.0 """ diff --git a/pandas/tests/io/formats/test_to_html.py b/pandas/tests/io/formats/test_to_html.py index eb71dd4c6914c..9666bc4977587 100644 --- a/pandas/tests/io/formats/test_to_html.py +++ b/pandas/tests/io/formats/test_to_html.py @@ -244,12 +244,6 @@ def test_to_html_border(option, result, expected): assert expected in result -def test_display_option_warning(): - with tm.assert_produces_warning(FutureWarning, - check_stacklevel=False): - pd.options.html.border - - @pytest.mark.parametrize('biggie_df_fixture', ['mixed'], indirect=True) def test_to_html(biggie_df_fixture): # TODO: split this test From ad76b589866bbd65ed55fc69552c700284345bae Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Mon, 27 May 2019 11:00:40 -0700 Subject: [PATCH 2/2] Remove html.border option --- pandas/core/config_init.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pandas/core/config_init.py b/pandas/core/config_init.py index de2128ef21dc3..7eb2b413822d9 100644 --- a/pandas/core/config_init.py +++ b/pandas/core/config_init.py @@ -358,10 +358,6 @@ def is_terminal(): cf.register_option('html.use_mathjax', True, pc_html_use_mathjax_doc, validator=is_bool) -with cf.config_prefix('html'): - cf.register_option('border', 1, pc_html_border_doc, - validator=is_int) - tc_sim_interactive_doc = """ : boolean Whether to simulate interactive mode for purposes of testing