From e2004223b148b05401a4a0dd46ec88d455b34609 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Thu, 13 Sep 2018 08:35:39 -0500 Subject: [PATCH 1/2] DEPR: Removed styler shim --- doc/source/whatsnew/v0.24.0.txt | 1 + pandas/formats/__init__.py | 0 pandas/formats/style.py | 7 ------- pandas/tests/io/formats/test_style.py | 8 -------- 4 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 pandas/formats/__init__.py delete mode 100644 pandas/formats/style.py diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index 232f879285543..3cdcb457b71f4 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -571,6 +571,7 @@ Removal of prior version deprecations/changes - Strings passed into :meth:`DataFrame.groupby` that refer to both column and index levels will raise a ``ValueError`` (:issue:`14432`) - :meth:`Index.repeat` and :meth:`MultiIndex.repeat` have renamed the ``n`` argument to ``repeats`` (:issue:`14645`) - Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`) +- Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler`` (:issue:`16059`) .. _whatsnew_0240.performance: diff --git a/pandas/formats/__init__.py b/pandas/formats/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/pandas/formats/style.py b/pandas/formats/style.py deleted file mode 100644 index ec4b4a2cde0c5..0000000000000 --- a/pandas/formats/style.py +++ /dev/null @@ -1,7 +0,0 @@ -import warnings - -warnings.warn("Styler has been moved from pandas.formats.style.Styler" - " to pandas.io.formats.style.Styler. This shim will be" - " removed in pandas 0.21", - FutureWarning) -from pandas.io.formats.style import Styler # noqa diff --git a/pandas/tests/io/formats/test_style.py b/pandas/tests/io/formats/test_style.py index 5254ccc742ab8..e407573c9a462 100644 --- a/pandas/tests/io/formats/test_style.py +++ b/pandas/tests/io/formats/test_style.py @@ -1269,11 +1269,3 @@ def test_from_custom_template(tmpdir): assert result.template is not Styler.template styler = result(pd.DataFrame({"A": [1, 2]})) assert styler.render() - - -def test_shim(): - # https://github.com/pandas-dev/pandas/pull/16059 - # Remove in 0.21 - with tm.assert_produces_warning(FutureWarning, - check_stacklevel=False): - from pandas.formats.style import Styler as _styler # noqa From 9d496a789c62e9a1fe2f15356864843d9faf081d Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Thu, 13 Sep 2018 08:36:25 -0500 Subject: [PATCH 2/2] sphinx --- doc/source/whatsnew/v0.24.0.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v0.24.0.txt b/doc/source/whatsnew/v0.24.0.txt index 3cdcb457b71f4..7031c16d5dca9 100644 --- a/doc/source/whatsnew/v0.24.0.txt +++ b/doc/source/whatsnew/v0.24.0.txt @@ -571,7 +571,7 @@ Removal of prior version deprecations/changes - Strings passed into :meth:`DataFrame.groupby` that refer to both column and index levels will raise a ``ValueError`` (:issue:`14432`) - :meth:`Index.repeat` and :meth:`MultiIndex.repeat` have renamed the ``n`` argument to ``repeats`` (:issue:`14645`) - Removal of the previously deprecated ``as_indexer`` keyword completely from ``str.match()`` (:issue:`22356`, :issue:`6581`) -- Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler`` (:issue:`16059`) +- Removed the ``pandas.formats.style`` shim for :class:`pandas.io.formats.style.Styler` (:issue:`16059`) .. _whatsnew_0240.performance: